当前位置: 首页>>代码示例>>PHP>>正文


PHP WP_Installer_Setup函数代码示例

本文整理汇总了PHP中WP_Installer_Setup函数的典型用法代码示例。如果您正苦于以下问题:PHP WP_Installer_Setup函数的具体用法?PHP WP_Installer_Setup怎么用?PHP WP_Installer_Setup使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了WP_Installer_Setup函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elseif

    require ICL_PLUGIN_PATH . '/inc/translation-management/translation-management.class.php';
    require ICL_PLUGIN_PATH . '/inc/translation-management/pro-translation.class.php';
    require ICL_PLUGIN_PATH . '/inc/pointers.php';
} elseif (preg_match('#wp-comments-post\\.php$#', $_SERVER['REQUEST_URI'])) {
    require ICL_PLUGIN_PATH . '/inc/translation-management/translation-management.class.php';
    require ICL_PLUGIN_PATH . '/inc/translation-management/pro-translation.class.php';
}
if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'activate' && $_REQUEST['action'] != 'activate-selected' || (!isset($_REQUEST['plugin']) || $_REQUEST['plugin'] != basename(ICL_PLUGIN_PATH) . '/' . basename(__FILE__)) && !@in_array(ICL_PLUGIN_FOLDER . '/' . basename(__FILE__), $_REQUEST['checked'])) {
    global $sitepress;
    $sitepress = new SitePress();
    $sitepress_settings = $sitepress->get_settings();
    // Comments translation
    if ($sitepress_settings['existing_content_language_verified']) {
        require ICL_PLUGIN_PATH . '/inc/comments-translation/functions.php';
    }
    require ICL_PLUGIN_PATH . '/modules/cache-plugins-integration/cache-plugins-integration.php';
    require ICL_PLUGIN_PATH . '/inc/wp-login-filters.php';
    require_once ICL_PLUGIN_PATH . '/inc/plugins-integration.php';
    // installer hook - start
    include_once ICL_PLUGIN_PATH . '/inc/installer/loader.php';
    //produces global variable $wp_installer_instance
    WP_Installer_Setup($wp_installer_instance, array('plugins_install_tab' => 1, 'site_key_nags' => array(array('repository_id' => 'wpml', 'product_name' => 'WPML', 'condition_cb' => array($sitepress, 'setup')))));
    // installer hook - end
}
if (!empty($sitepress_settings['automatic_redirect'])) {
    require_once ICL_PLUGIN_PATH . '/inc/browser-redirect.php';
}
// activation hook
register_activation_hook(WP_PLUGIN_DIR . '/' . ICL_PLUGIN_FOLDER . '/sitepress.php', 'icl_sitepress_activate');
register_deactivation_hook(WP_PLUGIN_DIR . '/' . ICL_PLUGIN_FOLDER . '/sitepress.php', 'icl_sitepress_deactivate');
add_filter('plugin_action_links', 'icl_plugin_action_links', 10, 2);
开发者ID:Calraiser,项目名称:flux,代码行数:31,代码来源:sitepress.php

示例2: define

     */
    define('WPCF_VERSION', '1.8.8');
}
define('WPCF_REPOSITORY', 'http://api.wp-types.com/');
define('WPCF_ABSPATH', dirname(__FILE__));
define('WPCF_RELPATH', plugins_url() . '/' . basename(WPCF_ABSPATH));
define('WPCF_INC_ABSPATH', WPCF_ABSPATH . '/includes');
define('WPCF_INC_RELPATH', WPCF_RELPATH . '/includes');
define('WPCF_RES_ABSPATH', WPCF_ABSPATH . '/resources');
define('WPCF_RES_RELPATH', WPCF_RELPATH . '/resources');
// Add installer
$installer = dirname(__FILE__) . '/plus/installer/loader.php';
if (file_exists($installer)) {
    include_once $installer;
    if (function_exists('WP_Installer_Setup')) {
        WP_Installer_Setup($wp_installer_instance, array('plugins_install_tab' => '1', 'repositories_include' => array('toolset', 'wpml')));
    }
}
require_once WPCF_INC_ABSPATH . '/constants.php';
/*
 * Since Types 1.2 we load all embedded code without conflicts
 */
require_once WPCF_ABSPATH . '/embedded/types.php';
require_once WPCF_ABSPATH . '/embedded/onthego-resources/loader.php';
onthego_initialize(WPCF_ABSPATH . '/embedded/onthego-resources/', WPCF_RELPATH . '/embedded/onthego-resources/');
// Plugin mode only hooks
add_action('plugins_loaded', 'wpcf_init');
// init hook for module manager
add_action('init', 'wpcf_wp_init');
register_deactivation_hook(__FILE__, 'wpcf_deactivation_hook');
register_activation_hook(__FILE__, 'wpcf_activation_hook');
开发者ID:VanessaGarcia-Freelance,项目名称:CrowdsLine,代码行数:31,代码来源:wpcf.php

示例3: activate_installer

/**
 * @param SitePress $sitepress
 */
function activate_installer($sitepress)
{
    // installer hook - start
    include_once ICL_PLUGIN_PATH . '/inc/installer/loader.php';
    //produces global variable $wp_installer_instance
    $args = array('plugins_install_tab' => 1, 'high_priority' => 1, 'site_key_nags' => array(array('repository_id' => 'wpml', 'product_name' => 'WPML', 'condition_cb' => array($sitepress, 'setup'))));
    /** @var WP_Installer $wp_installer_instance */
    WP_Installer_Setup($wp_installer_instance, $args);
    // installer hook - end
}
开发者ID:pcuervo,项目名称:odc,代码行数:13,代码来源:functions.php


注:本文中的WP_Installer_Setup函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。