-
Notifications
You must be signed in to change notification settings - Fork 7
/
scriptless-social-sharing.php
79 lines (71 loc) · 2.67 KB
/
scriptless-social-sharing.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
77
78
79
<?php
/**
* Scriptless Social Sharing
*
* @package ScriptlessSocialSharing
* @author Robin Cornett <[email protected]>
* @link https://github.com/robincornett/scriptless-social-sharing
* @copyright 2015-2021 Robin Cornett
* @license GPL-2.0+
*
* @wordpress-plugin
* Plugin Name: Scriptless Social Sharing
* Plugin URI: https://github.com/robincornett/scriptless-social-sharing
* Description: A scriptless plugin to add sharing buttons.
* Version: 3.2.4
* Requires at least: 5.2
* Tested up to: 6.4
* Requires PHP: 7.4
* Author: Robin Cornett
* Author URI: https://robincornett.com
* Text Domain: scriptless-social-sharing
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/robincornett/scriptless-social-sharing
* GitHub Branch: master
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
if ( ! defined( 'SCRIPTLESSOCIALSHARING_BASENAME' ) ) {
define( 'SCRIPTLESSOCIALSHARING_BASENAME', plugin_basename( __FILE__ ) );
}
if ( ! defined( 'SCRIPTLESSOCIALSHARING_VERSION' ) ) {
define( 'SCRIPTLESSOCIALSHARING_VERSION', '3.2.4' );
}
// Include classes
function scriptlesssocialsharing_require() {
$files = array(
'class-scriptlesssocialsharing',
'class-scriptlesssocialsharing-enqueue',
'output/class-scriptlesssocialsharing-output',
'output/class-scriptlesssocialsharing-output-buttons',
'output/class-scriptlesssocialsharing-output-locations',
'output/class-scriptlesssocialsharing-output-pinterest',
'output/class-scriptlesssocialsharing-output-shortcode',
'output/class-scriptlesssocialsharing-output-block',
'output/class-scriptlesssocialsharing-output-svg',
'buttons/class-scriptlesssocialsharing-button',
'postmeta/class-scriptlesssocialsharing-postmeta',
'settings/class-scriptlesssocialsharing-settings',
'helper-functions',
'class-scriptlesssocialsharing-button-maker',
);
foreach ( $files as $file ) {
require plugin_dir_path( __FILE__ ) . 'includes/' . $file . '.php';
}
}
scriptlesssocialsharing_require();
// Instantiate main class
$scriptlesssocialsharing = new ScriptlessSocialSharing(
new ScriptlessSocialSharingOutputLocations(),
new ScriptlessSocialSharingOutputButtons(),
new ScriptlessSocialSharingOutputPinterest(),
new ScriptlessSocialSharingPostMeta(),
new ScriptlessSocialSharingSettings(),
new ScriptlessSocialSharingOutputShortcode()
);
// Run the plugin
$scriptlesssocialsharing->run();