PluginProbe
Customify / 2.5.1
Customify v2.5.1
2.10.9 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.7.1 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.6.0 1.6.0.1 1.6.5 1.7.0 1.7.1 All 77 releases
← All changes | customify.php +30 -57 1.4.22.5.1 View file →
@@ -1,67 +1,40 @@
1 1 <?php
2 -/*
3 -Plugin Name: Customify
4 -Plugin URI: https://pixelgrade.com
5 -Description: A Theme Customizer Booster
6 -Version: 1.4.2
7 -Author: PixelGrade
8 -Author URI: https://pixelgrade.com
9 -Author Email: contact@pixelgrade.com
10 -Text Domain: customify
11 -License: GPL-2.0+
12 -License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13 -Domain Path: /languages/
14 -*/
2 +/**
3 + * Plugin Name: Customify
4 + * Plugin URI: https://wordpress.org/plugins/customify/
5 + * Description: A Theme Customizer Booster to easily and consistently customize Fonts, Colors, and other options for your site.
6 + * Version: 2.5.1
7 + * Author: Pixelgrade
8 + * Author URI: https://pixelgrade.com
9 + * Author Email: contact@pixelgrade.com
10 + * Text Domain: customify
11 + * License: GPL-2.0+
12 + * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13 + * Domain Path: /languages/
14 + * Requires at least: 4.9.9
15 + * Tested up to: 5.2.2
16 + */
15 17
16 18 // If this file is called directly, abort.
17 -if ( ! defined( 'WPINC' ) ) {
19 +if ( ! defined( 'ABSPATH' ) ) {
18 20 die;
19 21 }
20 22
21 -// ensure EXT is defined
22 -if ( ! defined('EXT')) {
23 - define('EXT', '.php');
24 -}
23 +require_once 'includes/lib/class-customify-array.php';
24 +require_once 'includes/extras.php';
25 25
26 -require 'core/bootstrap'.EXT;
26 +/**
27 + * Returns the main instance of PixCustomifyPlugin to prevent the need to use globals.
28 + *
29 + * @since 1.5.0
30 + * @return PixCustomifyPlugin
31 + */
32 +function PixCustomifyPlugin() {
33 + require_once plugin_dir_path( __FILE__ ) . 'includes/class-pixcustomify.php';
27 34
28 -$config = include 'plugin-config'.EXT;
29 -
30 -// set textdomain
31 -pixcustomify::settextdomain('customify');
32 -
33 -// Ensure Test Data
34 -// ----------------
35 -
36 -$defaults = include 'plugin-defaults'.EXT;
37 -
38 -$current_data = get_option($config['settings-key']);
39 -
40 -if ($current_data === false) {
41 - add_option($config['settings-key'], $defaults);
35 + return PixCustomifyPlugin::instance( __FILE__, '2.5.1' );
42 36 }
43 -else if (count(array_diff_key($defaults, $current_data)) != 0) {
44 - $plugindata = array_merge($defaults, $current_data);
45 - update_option($config['settings-key'], $plugindata);
46 -}
47 -# else: data is available; do nothing
48 37
49 -// Load Callbacks
50 -// --------------
51 -
52 -$basepath = dirname(__FILE__).DIRECTORY_SEPARATOR;
53 -$callbackpath = $basepath.'callbacks'.DIRECTORY_SEPARATOR;
54 -pixcustomify::require_all($callbackpath);
55 -
56 -require_once( plugin_dir_path( __FILE__ ) . 'class-pixcustomify.php' );
57 -
58 -// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
59 -register_activation_hook( __FILE__, array( 'PixCustomifyPlugin', 'activate' ) );
60 -//register_deactivation_hook( __FILE__, array( 'customifyPlugin', 'deactivate' ) );
61 -
62 -
63 -function customify_init_plugin () {
64 - global $pixcustomify_plugin;
65 - $pixcustomify_plugin = PixCustomifyPlugin::get_instance();
66 -}
67 -add_action('plugins_loaded', 'customify_init_plugin', 20 );
38 +// Now get the party started
39 +// We will keep this global variable for legacy
40 +$pixcustomify_plugin = PixCustomifyPlugin();