forked from michael-cannon/wordpress-starter
/
wordpress-starter.php
130 lines (100 loc) · 3.25 KB
/
wordpress-starter.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
/**
* Plugin Name: WordPress Starter
* Plugin URI: http://wordpress.org/plugins/wordpress-starter/
* Description: TBD
* Version: 1.0.0
* Author: Axelerant
* Author URI: https://axelerant.com/
* License: GPLv2 or later
* Text Domain: wordpress-starter
* Domain Path: /languages
*/
/**
WordPress Starter
Copyright (C) 2015 Axelerant
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 accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! defined( 'WPS_AIHR_VERSION' ) ) {
define( 'WPS_AIHR_VERSION', '1.2.2RC1' );
}
if ( ! defined( 'WPS_BASE' ) ) {
define( 'WPS_BASE', plugin_basename( __FILE__ ) );
}
if ( ! defined( 'WPS_DIR' ) ) {
define( 'WPS_DIR', plugin_dir_path( __FILE__ ) );
}
if ( ! defined( 'WPS_DIR_INC' ) ) {
define( 'WPS_DIR_INC', WPS_DIR . 'includes/' );
}
if ( ! defined( 'WPS_DIR_LIB' ) ) {
define( 'WPS_DIR_LIB', WPS_DIR_INC . 'libraries/' );
}
if ( ! defined( 'WPS_NAME' ) ) {
define( 'WPS_NAME', 'WordPress Starter' );
}
if ( ! defined( 'WPS_PREMIUM_LINK' ) ) {
define( 'WPS_PREMIUM_LINK', '<a href="https://store.axelerant.com/downloads/wordpress-starter-premium/">Buy Premium</a>' );
}
if ( ! defined( 'WPS_VERSION' ) ) {
define( 'WPS_VERSION', '1.0.0' );
}
require_once WPS_DIR_INC . 'requirements.php';
global $wps_activated;
$wps_activated = true;
if ( ! wps_requirements_check() ) {
$wps_activated = false;
return false;
}
require_once WPS_DIR_INC . 'class-wordpress-starter.php';
add_action( 'plugins_loaded', 'wordpress_starter_init', 99 );
/**
*
*
* @SuppressWarnings(PHPMD.LongVariable)
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
*/
if ( ! function_exists( 'wordpress_starter_init' ) ) {
function wordpress_starter_init() {
if ( ! is_admin() ) {
return;
}
if ( ! function_exists( 'add_screen_meta_link' ) ) {
require_once WPS_DIR_LIB . 'screen-meta-links.php';
}
if ( WordPress_Starter::version_check() ) {
global $WordPress_Starter;
if ( is_null( $WordPress_Starter ) ) {
$WordPress_Starter = new WordPress_Starter();
}
global $WordPress_Starter_Settings;
if ( is_null( $WordPress_Starter_Settings ) ) {
$WordPress_Starter_Settings = new WordPress_Starter_Settings();
}
do_action( 'wps_init' );
}
}
}
register_activation_hook( __FILE__, array( 'WordPress_Starter', 'activation' ) );
register_deactivation_hook( __FILE__, array( 'WordPress_Starter', 'deactivation' ) );
register_uninstall_hook( __FILE__, array( 'WordPress_Starter', 'uninstall' ) );
if ( ! function_exists( 'wordpress_starter_shortcode' ) ) {
function wordpress_starter_shortcode( $atts ) {
return WordPress_Starter::wordpress_starter_shortcode( $atts );
}
}
?>