forked from alex11/wordpress-plugins
/
2-click-socialmedia-buttons.php
executable file
·76 lines (70 loc) · 1.9 KB
/
2-click-socialmedia-buttons.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* Plugin Name: 2 Click Social Media Buttons
* Plugin URI: http://ppfeufer.de/wordpress-plugin/2-click-social-media-buttons/
* Description: Adding buttons for Facebook (Like/Recommend), Twitter, Google+, Flattr, Xing, Pinteres, t3n and LinkedIn to your WordPress-Website in respect with the german privacy law.
* Version: 1.6.2
* Author: H.-Peter Pfeufer
* Author URI: http://ppfeufer.de
* Text Domain: twoclick-socialmedia
* Domain Path: /l10n
*/
/**
* Avoid direct calls to this file
*
* @since 1.0
* @author ppfeufer
*
* @package 2 Click Social Media Buttons
*/
if(!function_exists('add_action')) {
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit();
} // END if(!function_exists('add_action'))
/**
* Konstanten
*/
define('TWOCLICK_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('TWOCLICK_PLUGIN_URI', plugin_dir_url(__FILE__));
define('TWOCLICK_BASENAME', plugin_basename(__FILE__));
define('TWOCLICK_TEXTDOMAIN', 'twoclick-socialmedia');
define('TWOCLICK_L10N_DIR', dirname(plugin_basename( __FILE__ )) . '/l10n/');
define('TWOCLICK_WORDPRESS_REQUIERED', '3.4');
define('TWOCLICK_JQUERY_REQUIERED', '1.7');
/**
* Check if we have the right WordPress Version at minimun.
*
* Minimum Requirements:
* WordPress 3.4
* jQuery 1.7
*
* @since 1.5
* @author ppfeufer
*/
if(version_compare($GLOBALS['wp_version'], TWOCLICK_WORDPRESS_REQUIERED, '<')) {
return false;
}
/**
* Loading libs used in backend
*
* @since 1.0
* @author ppfeufer
*
* @package 2 Click Social Media Buttons
*/
if(is_admin()) {
require_once(TWOCLICK_PLUGIN_DIR . 'libs/class-twoclick-backend.php');
}
/**
* Loading libs used in frontend
*
* @since 1.0
* @author ppfeufer
*
* @package 2 Click Social Media Buttons
*/
if(!is_admin()) {
// require_once(TWOCLICK_PLUGIN_DIR . 'libs/class-twoclick-opengraph.php');
require_once(TWOCLICK_PLUGIN_DIR . 'libs/class-twoclick-frontend.php');
}