PluginProbe
Customify / 1.2.3
Customify v1.2.3
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 +32 -29 1.5.01.2.3 View file →
@@ -1,17 +1,24 @@
1 1 <?php
2 2 /*
3 +* @package Customify
4 +* @author PixelGrade <contact@pixelgrade.com>
5 +* @license GPL-2.0+
6 +* @link http://pixelgrade.com
7 +* @copyright 2014 PixelGrade
8 +*
9 +* @wordpress-plugin
3 10 Plugin Name: Customify
4 -Plugin URI: https://wordpress.org/plugins/customify/
11 +Plugin URI: http://pixelgrade.com
5 12 Description: A Theme Customizer Booster
6 -Version: 1.5.0
13 +Version: 1.2.3
7 14 Author: PixelGrade
8 -Author URI: https://pixelgrade.com
15 +Author URI: http://pixelgrade.com
9 16 Author Email: contact@pixelgrade.com
10 -Text Domain: customify
17 +Text Domain: pixcustomify_txtd
11 18 License: GPL-2.0+
12 19 License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13 -Domain Path: /languages/
20 +Domain Path: /lang
14 21 */
15 22
16 23 // If this file is called directly, abort.
17 24 if ( ! defined( 'WPINC' ) ) {
@@ -27,9 +34,9 @@
27 34
28 35 $config = include 'plugin-config'.EXT;
29 36
30 37 // set textdomain
31 -pixcustomify::settextdomain('customify');
38 +pixcustomify::settextdomain($config['textdomain']);
32 39
33 40 // Ensure Test Data
34 41 // ----------------
35 42
@@ -34,34 +41,30 @@
34 41 // ----------------
35 42
36 43 $defaults = include 'plugin-defaults'.EXT;
37 44
38 -$current_data = get_option( $config['settings-key'] );
45 +$current_data = get_option($config['settings-key']);
39 46
40 -if ( $current_data === false ) {
41 - add_option( $config['settings-key'], $defaults );
42 -} elseif ( count( array_diff_key( $defaults, $current_data ) ) != 0) {
43 - $plugindata = array_merge( $defaults, $current_data );
44 - update_option( $config['settings-key'], $plugindata );
47 +if ($current_data === false) {
48 + add_option($config['settings-key'], $defaults);
45 49 }
50 +else if (count(array_diff_key($defaults, $current_data)) != 0) {
51 + $plugindata = array_merge($defaults, $current_data);
52 + update_option($config['settings-key'], $plugindata);
53 +}
46 54 # else: data is available; do nothing
47 55
48 -/**
49 - * Returns the main instance of PixCustomifyPlugin to prevent the need to use globals.
50 - *
51 - * @since 1.5.0
52 - * @return PixCustomifyPlugin
53 - */
54 -function PixCustomifyPlugin() {
56 +// Load Callbacks
57 +// --------------
55 58
56 - require_once( plugin_dir_path( __FILE__ ) . 'class-pixcustomify.php' );
57 - $instance = PixCustomifyPlugin::instance( __FILE__, '1.5.0' );
58 - return $instance;
59 -}
59 +$basepath = dirname(__FILE__).DIRECTORY_SEPARATOR;
60 +$callbackpath = $basepath.'callbacks'.DIRECTORY_SEPARATOR;
61 +pixcustomify::require_all($callbackpath);
60 62
61 -// Now get the party started
62 -// We will keep this global variable for legacy
63 -$pixcustomify_plugin = PixCustomifyPlugin();
63 +require_once( plugin_dir_path( __FILE__ ) . 'class-pixcustomify.php' );
64 64
65 -// Load custom modules
66 -require_once( 'features/class-CSS_Editor.php' );
67 -require_once( 'features/class-Font_Selector.php' );
65 +// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
66 +register_activation_hook( __FILE__, array( 'PixCustomifyPlugin', 'activate' ) );
67 +//register_deactivation_hook( __FILE__, array( 'customifyPlugin', 'deactivate' ) );
68 +
69 +global $pixcustomify_plugin;
70 +$pixcustomify_plugin = PixCustomifyPlugin::get_instance();