本文整理汇总了PHP中yit_maybe_plugin_fw_loader函数的典型用法代码示例。如果您正苦于以下问题:PHP yit_maybe_plugin_fw_loader函数的具体用法?PHP yit_maybe_plugin_fw_loader怎么用?PHP yit_maybe_plugin_fw_loader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yit_maybe_plugin_fw_loader函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
*/
if (!defined('ABSPATH')) {
exit;
}
// Exit if accessed directly
if (!function_exists('is_plugin_active')) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
if (!defined('YITH_YWSL_DIR')) {
define('YITH_YWSL_DIR', plugin_dir_path(__FILE__));
}
/* Plugin Framework Version Check */
if (!function_exists('yit_maybe_plugin_fw_loader') && file_exists(YITH_YWSL_DIR . 'plugin-fw/init.php')) {
require_once YITH_YWSL_DIR . 'plugin-fw/init.php';
}
yit_maybe_plugin_fw_loader(YITH_YWSL_DIR);
// This version can't be activate if premium version is active ________________________________________
if (defined('YITH_YWSL_PREMIUM')) {
function yith_ywsl_install_free_admin_notice()
{
?>
<div class="error">
<p><?php
_e('You can\'t activate the free version of YITH Woocommerce Social Login while you are using the premium one.', 'yith-woocommerce-social-login');
?>
</p>
</div>
<?php
}
add_action('admin_notices', 'yith_ywsl_install_free_admin_notice');
deactivate_plugins(plugin_basename(__FILE__));
示例2: define
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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
if (!defined('ABSPATH')) {
exit;
}
// Exit if accessed directly
if (!defined('YITH_WCAS_DIR')) {
define('YITH_WCAS_DIR', plugin_dir_path(__FILE__));
}
/* Plugin Framework Version Check */
if (!function_exists('yit_maybe_plugin_fw_loader') && file_exists(YITH_WCAS_DIR . 'plugin-fw/init.php')) {
require_once YITH_WCAS_DIR . 'plugin-fw/init.php';
}
yit_maybe_plugin_fw_loader(YITH_WCAS_DIR);
if (defined('YITH_WCAS_PREMIUM')) {
function yith_wcas_install_free_admin_notice()
{
?>
<div class="error">
<p><?php
_e('You can\'t activate the free version of YITH WooCommerce Ajax Search while you are using the premium one.', 'yith-woocommerce-ajax-search');
?>
</p>
</div>
<?php
}
add_action('admin_notices', 'yith_wcas_install_free_admin_notice');
deactivate_plugins(plugin_basename(__FILE__));
return;
示例3: define
define('YITH_WOOCOMPARE_URL', plugin_dir_url(__FILE__));
}
if (!defined('YITH_WOOCOMPARE_DIR')) {
define('YITH_WOOCOMPARE_DIR', plugin_dir_path(__FILE__));
}
if (!defined('YITH_WOOCOMPARE_TEMPLATE_PATH')) {
define('YITH_WOOCOMPARE_TEMPLATE_PATH', YITH_WOOCOMPARE_DIR . 'templates');
}
if (!defined('YITH_WOOCOMPARE_ASSETS_URL')) {
define('YITH_WOOCOMPARE_ASSETS_URL', YITH_WOOCOMPARE_URL . 'assets');
}
/* Plugin Framework Version Check */
if (!function_exists('yit_maybe_plugin_fw_loader') && file_exists(YITH_WOOCOMPARE_DIR . 'plugin-fw/init.php')) {
require_once YITH_WOOCOMPARE_DIR . 'plugin-fw/init.php';
}
yit_maybe_plugin_fw_loader(YITH_WOOCOMPARE_DIR);
function yith_woocompare_constructor()
{
global $woocommerce;
if (!isset($woocommerce) || !function_exists('WC')) {
add_action('admin_notices', 'yith_woocompare_install_woocommerce_admin_notice');
return;
} elseif (defined('YITH_WOOCOMPARE_PREMIUM')) {
add_action('admin_notices', 'yith_woocompare_install_free_admin_notice');
deactivate_plugins(plugin_basename(__FILE__));
return;
}
load_plugin_textdomain('yith-woocommerce-compare', false, dirname(plugin_basename(__FILE__)) . '/languages/');
// Load required classes and functions
require_once 'includes/class.yith-woocompare-helper.php';
require_once 'includes/functions.yith-woocompare.php';
示例4: YITH_Vendors
if (!function_exists('YITH_Vendors')) {
/**
* Unique access to instance of YITH_Vendors class
*
* @return YITH_Vendors|YITH_Vendors_Premium
* @since 1.0.0
*/
function YITH_Vendors()
{
// Load required classes and functions
require_once YITH_WPV_PATH . 'includes/class.yith-vendors.php';
if (defined('YITH_WPV_PREMIUM') && file_exists(YITH_WPV_PATH . 'includes/class.yith-vendors-premium.php')) {
require_once YITH_WPV_PATH . 'includes/class.yith-vendors-premium.php';
return YITH_Vendors_Premium::instance();
}
return YITH_Vendors::instance();
}
}
/* Plugin Framework Version Check */
if (!function_exists('yit_maybe_plugin_fw_loader') && file_exists(YITH_WPV_PATH . 'plugin-fw/init.php')) {
require_once YITH_WPV_PATH . 'plugin-fw/init.php';
}
yit_maybe_plugin_fw_loader(YITH_WPV_PATH);
/**
* Instance main plugin class
*/
YITH_Vendors();
register_activation_hook(YITH_WPV_FILE, array('YITH_Commissions', 'create_commissions_table'));
register_activation_hook(YITH_WPV_FILE, 'YITH_Vendors::add_vendor_role');
register_deactivation_hook(YITH_WPV_FILE, 'YITH_Vendors::setup');
register_deactivation_hook(YITH_WPV_FILE, 'YITH_Vendors::remove_vendor_role');
示例5: define
define('YWRR_DIR', plugin_dir_path(__FILE__));
}
if (!defined('YWRR_URL')) {
define('YWRR_URL', plugins_url('/', __FILE__));
}
if (!defined('YWRR_ASSETS_URL')) {
define('YWRR_ASSETS_URL', YWRR_URL . 'assets/');
}
if (!defined('YWRR_TEMPLATE_PATH')) {
define('YWRR_TEMPLATE_PATH', YWRR_DIR . 'templates/');
}
/* Plugin Framework Version Check */
if (!function_exists('yit_maybe_plugin_fw_loader') && file_exists(YWRR_DIR . 'plugin-fw/init.php')) {
require_once YWRR_DIR . 'plugin-fw/init.php';
}
yit_maybe_plugin_fw_loader(YWRR_DIR);
function ywrr_init()
{
/* Load YWRR text domain */
load_plugin_textdomain('yith-woocommerce-review-reminder', false, dirname(plugin_basename(__FILE__)) . '/languages/');
YITH_WRR();
}
add_action('ywrr_init', 'ywrr_init');
function ywrr_install()
{
if (!function_exists('WC')) {
add_action('admin_notices', 'ywrr_install_woocommerce_admin_notice');
} elseif (defined('YWRR_PREMIUM')) {
add_action('admin_notices', 'ywrr_install_free_admin_notice');
deactivate_plugins(plugin_basename(__FILE__));
} else {
示例6: define
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
if (!defined('YJP_DIR')) {
define('YJP_DIR', plugin_dir_path(__FILE__));
}
if (!defined('YJP_URL')) {
define('YJP_URL', plugins_url('/', __FILE__));
}
if (!defined('YJP_ASSETS_URL')) {
define('YJP_ASSETS_URL', YJP_URL . 'assets');
}
if (!defined('YJP_TEMPLATE_PATH')) {
define('YJP_TEMPLATE_PATH', YJP_DIR . 'templates');
}
if (!function_exists('yith_plugin_registration_hook')) {
require_once 'plugin-fw/yit-plugin-registration-hook.php';
}
register_activation_hook(__FILE__, 'yith_plugin_registration_hook');
/* Plugin Framework Version Check */
!function_exists('yit_maybe_plugin_fw_loader') && (require_once 'plugin-fw/init.php');
yit_maybe_plugin_fw_loader(dirname(__FILE__));
/**
* Check if a jetpack module is currently active and try disabling before activating this one
*/
if (!function_exists('yith_deactive_jetpack_module')) {
require_once 'yith-deactive-module.php';
}
load_plugin_textdomain('yith-essential-kit-for-woocommerce-1', false, dirname(plugin_basename(__FILE__)) . '/languages/');
require_once YJP_DIR . 'yith-jetpack.php';
global $yith_jetpack_1;
$yith_jetpack_1 = new YITH_JetPack(__FILE__, 'YITH Essential Kit for WooCommerce #1', 1);