當前位置: 首頁>>代碼示例>>PHP>>正文


PHP yit_maybe_plugin_fw_loader函數代碼示例

本文整理匯總了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__));
開發者ID:lieison,項目名稱:IndustriasFenix,代碼行數:31,代碼來源:init.php

示例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;
開發者ID:bqevin,項目名稱:wp-shopeasy,代碼行數:31,代碼來源:init.php

示例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';
開發者ID:Qualitair,項目名稱:ecommerce,代碼行數:31,代碼來源:init.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');
開發者ID:k2jysy,項目名稱:mergeshop,代碼行數:31,代碼來源:init.php

示例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 {
開發者ID:VitaliyProdan,項目名稱:wp_shop,代碼行數:31,代碼來源:init.php

示例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);
開發者ID:yarwalker,項目名稱:ecobyt,代碼行數:31,代碼來源:init.php


注:本文中的yit_maybe_plugin_fw_loader函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。