| @@ -1,48 +1,70 @@ | ||
| 1 | 1 | <?php |
| 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.10.9 | |
| 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: 5.9.0 | |
| 15 | - * Tested up to: 7.1 | |
| 16 | - * Requires PHP: 7.4 | |
| 17 | - */ | |
| 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 | |
| 10 | +Plugin Name: Customify | |
| 11 | +Plugin URI: http://pixelgrade.com | |
| 12 | +Description: A Theme Customizer Booster | |
| 13 | +Version: 1.2.3 | |
| 14 | +Author: PixelGrade | |
| 15 | +Author URI: http://pixelgrade.com | |
| 16 | +Author Email: contact@pixelgrade.com | |
| 17 | +Text Domain: pixcustomify_txtd | |
| 18 | +License: GPL-2.0+ | |
| 19 | +License URI: http://www.gnu.org/licenses/gpl-2.0.txt | |
| 20 | +Domain Path: /lang | |
| 21 | +*/ | |
| 18 | 22 | |
| 19 | 23 | // If this file is called directly, abort. |
| 20 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 24 | +if ( ! defined( 'WPINC' ) ) { | |
| 21 | 25 | die; |
| 22 | 26 | } |
| 23 | 27 | |
| 24 | -// Style Manager ships a deprecated Customify compatibility layer that owns this | |
| 25 | -// legacy global API when both plugins are active. Avoid redeclaring it. | |
| 26 | -if ( ! function_exists( 'PixCustomifyPlugin' ) && ! class_exists( 'PixCustomifyPlugin', false ) ) { | |
| 27 | - require_once 'includes/lib/class-customify-array.php'; | |
| 28 | - require_once 'includes/extras.php'; | |
| 28 | +// ensure EXT is defined | |
| 29 | +if ( ! defined('EXT')) { | |
| 30 | + define('EXT', '.php'); | |
| 31 | +} | |
| 29 | 32 | |
| 30 | - /** | |
| 31 | - * Returns the main instance of PixCustomifyPlugin to prevent the need to use globals. | |
| 32 | - * | |
| 33 | - * @since 1.5.0 | |
| 34 | - * @return PixCustomifyPlugin | |
| 35 | - */ | |
| 36 | - function PixCustomifyPlugin() { | |
| 37 | - require_once plugin_dir_path( __FILE__ ) . 'includes/class-pixcustomify.php'; | |
| 33 | +require 'core/bootstrap'.EXT; | |
| 38 | 34 | |
| 39 | - return PixCustomifyPlugin::instance( __FILE__, '2.10.9' ); | |
| 40 | - } | |
| 35 | +$config = include 'plugin-config'.EXT; | |
| 41 | 36 | |
| 42 | - // Now get the party started. | |
| 43 | - // We will keep this global variable for legacy reasons. | |
| 44 | - $pixcustomify_plugin = PixCustomifyPlugin(); | |
| 37 | +// set textdomain | |
| 38 | +pixcustomify::settextdomain($config['textdomain']); | |
| 45 | 39 | |
| 46 | - // Load all third-party plugins integrations. | |
| 47 | - require_once 'includes/integrations.php'; | |
| 40 | +// Ensure Test Data | |
| 41 | +// ---------------- | |
| 42 | + | |
| 43 | +$defaults = include 'plugin-defaults'.EXT; | |
| 44 | + | |
| 45 | +$current_data = get_option($config['settings-key']); | |
| 46 | + | |
| 47 | +if ($current_data === false) { | |
| 48 | + add_option($config['settings-key'], $defaults); | |
| 48 | 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 | +} | |
| 54 | +# else: data is available; do nothing | |
| 55 | + | |
| 56 | +// Load Callbacks | |
| 57 | +// -------------- | |
| 58 | + | |
| 59 | +$basepath = dirname(__FILE__).DIRECTORY_SEPARATOR; | |
| 60 | +$callbackpath = $basepath.'callbacks'.DIRECTORY_SEPARATOR; | |
| 61 | +pixcustomify::require_all($callbackpath); | |
| 62 | + | |
| 63 | +require_once( plugin_dir_path( __FILE__ ) . 'class-pixcustomify.php' ); | |
| 64 | + | |
| 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(); | |