public static function instance() { if (!self::$instance) { self::$instance = new Youxi_Admin_Notice(); } return self::$instance; }
function youxi_portfolio_plugins_loaded() { if (!defined('YOUXI_CORE_VERSION')) { if (!class_exists('Youxi_Admin_Notice')) { require plugin_dir_path(__FILE__) . 'class-admin-notice.php'; } Youxi_Admin_Notice::instance()->add_error(__FILE__, __('This plugin requires you to install and activate the Youxi Core plugin.', 'youxi')); return; } define('YOUXI_PORTFOLIO_VERSION', '1.3'); define('YOUXI_PORTFOLIO_DIR', plugin_dir_path(__FILE__)); define('YOUXI_PORTFOLIO_URL', plugin_dir_url(__FILE__)); define('YOUXI_PORTFOLIO_LANG_DIR', dirname(plugin_basename(__FILE__)) . '/languages/'); /* Load Language File */ load_plugin_textdomain('youxi', false, YOUXI_PORTFOLIO_LANG_DIR); require_once YOUXI_PORTFOLIO_DIR . 'class-portfolio.php'; require_once YOUXI_PORTFOLIO_DIR . 'portfolio-shortcode.php'; }
function youxi_post_format_plugins_loaded() { if (!defined('YOUXI_CORE_VERSION')) { if (!class_exists('Youxi_Admin_Notice')) { require plugin_dir_path(__FILE__) . 'class-admin-notice.php'; } Youxi_Admin_Notice::instance()->add_error(__FILE__, __('This plugin requires you to install and activate the Youxi Core plugin.', 'youxi')); return; } define('YOUXI_POST_FORMAT_VERSION', '1.1.2'); define('YOUXI_POST_FORMAT_DIR', plugin_dir_path(__FILE__)); define('YOUXI_POST_FORMAT_URL', plugin_dir_url(__FILE__)); define('YOUXI_POST_FORMAT_LANG_DIR', plugin_dir_path(__FILE__) . 'languages' . DIRECTORY_SEPARATOR); /* Load Language File */ load_plugin_textdomain('youxi', false, YOUXI_POST_FORMAT_LANG_DIR); if (!class_exists('Youxi_Post_Formats_Manager')) { require_once YOUXI_POST_FORMAT_DIR . 'class-manager.php'; } new Youxi_Post_Formats_Manager(); }
function youxi_shortcode_plugins_loaded() { if (!defined('YOUXI_CORE_VERSION')) { if (!class_exists('Youxi_Admin_Notice')) { require plugin_dir_path(__FILE__) . 'class-admin-notice.php'; } Youxi_Admin_Notice::instance()->add_error(__FILE__, __('This plugin requires you to install and activate the Youxi Core plugin.', 'youxi')); return; } define('YOUXI_SHORTCODE_VERSION', '3.2'); define('YOUXI_SHORTCODE_DIR', plugin_dir_path(__FILE__)); define('YOUXI_SHORTCODE_URL', plugin_dir_url(__FILE__)); define('YOUXI_SHORTCODE_LANG_DIR', dirname(plugin_basename(__FILE__)) . '/languages/'); /* Load Language File */ load_plugin_textdomain('youxi', false, YOUXI_SHORTCODE_LANG_DIR); /* Include the default shortcodes */ require_once YOUXI_SHORTCODE_DIR . 'definitions/layout.php'; require_once YOUXI_SHORTCODE_DIR . 'definitions/content.php'; require_once YOUXI_SHORTCODE_DIR . 'definitions/statistic.php'; require_once YOUXI_SHORTCODE_DIR . 'definitions/media.php'; require_once YOUXI_SHORTCODE_DIR . 'definitions/uncategorized.php'; /* Instantiate the manager */ if (!class_exists('Youxi_Shortcode_Manager')) { require YOUXI_SHORTCODE_DIR . 'classes/class-manager.php'; } Youxi_Shortcode_Manager::get(); }
function youxi_builder_plugins_loaded() { global $wp_version; if (!defined('YOUXI_SHORTCODE_VERSION')) { if (!class_exists('Youxi_Admin_Notice')) { require plugin_dir_path(__FILE__) . 'class-admin-notice.php'; } Youxi_Admin_Notice::instance()->add_error(__FILE__, __('This plugin requires you to install and activate the Youxi Shortcodes plugin.', 'youxi')); return; } else { if (version_compare(YOUXI_SHORTCODE_VERSION, '3.1', '<')) { if (!class_exists('Youxi_Admin_Notice')) { require plugin_dir_path(__FILE__) . 'class-admin-notice.php'; } Youxi_Admin_Notice::instance()->add_error(__FILE__, __('The current version of this plugin requires at least Youxi Shortcode 3.1 to work.', 'youxi')); return; } } if (version_compare($wp_version, '4.3', '<')) { if (!class_exists('Youxi_Admin_Notice')) { require plugin_dir_path(__FILE__) . 'class-admin-notice.php'; } Youxi_Admin_Notice::instance()->add_error(__FILE__, __('The current version of this plugin requires at least WordPress 4.3.', 'youxi')); return; } define('YOUXI_BUILDER_VERSION', '2.4.1'); define('YOUXI_BUILDER_DIR', plugin_dir_path(__FILE__)); define('YOUXI_BUILDER_URL', plugin_dir_url(__FILE__)); define('YOUXI_BUILDER_LANG_DIR', dirname(plugin_basename(__FILE__)) . '/languages/'); /* Load Language File */ load_plugin_textdomain('youxi', false, YOUXI_BUILDER_LANG_DIR); /* Instantiate the manager */ if (!class_exists('Youxi_Builder_Manager')) { require YOUXI_BUILDER_DIR . 'classes/class-manager.php'; } Youxi_Builder_Manager::instance(); }