-
Notifications
You must be signed in to change notification settings - Fork 5
/
wp-sharrre.php
93 lines (71 loc) · 2.9 KB
/
wp-sharrre.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
/**
* @package WP Sharrre
* @since December 19, 2012
* @license http://www.gnu.org/licenses/gpl-2.0.html
*/
/*
Plugin Name: WP Sharrre
Plugin URI: https://derekmarcinyshyn.github.com/wp-sharrre
Description: WP Sharrre is a WordPress plugin based on a jQuery plugin that allows you to create nice widgets sharing for Facebook, Twitter, Google Plus and more.
Author: Derek Marcinyshyn
Author URI: http://derek.marcinyshyn.com
Version: 1.3
License: GPLv2
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
// Exit if called directly
defined( 'ABSPATH' ) or die( "Cannot access pages directly." );
// Plugin version
define( 'WP_SHARRRE_VERSION', '1.3');
// Plugin
define( 'WP_SHARRRE_PLUGIN', __FILE__ );
// Plugin directory
define( 'WP_SHARRRE_DIRECTORY', dirname( plugin_basename(__FILE__) ) );
// Plugin path
define( 'WP_SHARRRE_PATH', WP_PLUGIN_DIR . '/' . WP_SHARRRE_DIRECTORY );
// App path
define( 'WP_SHARRRE_APP_PATH', WP_SHARRRE_PATH . '/app' );
// Lib path
define( 'WP_SHARRRE_LIB_PATH', WP_SHARRRE_PATH . '/lib' );
// URL
define( 'WP_SHARRRE_URL', WP_PLUGIN_URL . '/' . WP_SHARRRE_DIRECTORY );
// Require main class
require_once WP_SHARRRE_APP_PATH . '/code/Block/App.php';
// Require settings-api
require_once WP_SHARRRE_LIB_PATH . '/vendor/settings-api/class.settings-api.php';
// Require admin class
require_once WP_SHARRRE_APP_PATH . '/code/Block/Admin.php';
// Require frontend class
require_once WP_SHARRRE_APP_PATH . '/code/View/Frontend.php';
// Require updater class
include_once( WP_SHARRRE_LIB_PATH . '/vendor/updater/updater.php' );
// ====================================
// = Initialize and setup application =
// ====================================
global $wp_sharrre_app,
$wp_sharrre_frontend,
$wp_sharrre_settings_api,
$wp_sharrre_admin;
// Settings API
use WP_Sharrre\Settings\Settings_API;
$wp_sharrre_settings_api = \WP_Sharrre\Settings\Settings_API::getInstance();
// Frontend view
use WP_Sharrre\View\Frontend;
$wp_sharrre_frontend = \WP_Sharrre\View\Frontend::get_instance();
// Settings page
use WP_Sharrre\Administrator\WP_Sharrre_Admin;
$wp_sharrre_admin = \WP_Sharrre\Administrator\WP_Sharrre_Admin::get_instance();
// Main class app initialization in App::__construct()
use WP_Sharrre\App;
$wp_sharrre_app = \WP_Sharrre\App::get_instance();