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


PHP tgmpa函数代码示例

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


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

示例1: x_register_theme_plugins

 function x_register_theme_plugins()
 {
     $template_directory_uri = get_template_directory_uri();
     $plugins = array(array('name' => 'X Shortcodes', 'slug' => 'x-shortcodes', 'source' => $template_directory_uri . '/framework/plugins/x-shortcodes.zip', 'required' => true, 'version' => '', 'force_activation' => true, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Slider Revolution', 'slug' => 'revslider', 'source' => $template_directory_uri . '/framework/plugins/revslider.zip', 'required' => false, 'version' => '4.3.8', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'manage_upgrade' => 'revslider/revslider.php'), array('name' => 'Visual Composer', 'slug' => 'js_composer', 'source' => $template_directory_uri . '/framework/plugins/js_composer.zip', 'required' => false, 'version' => '4.1.3', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'manage_upgrade' => 'js_composer/js_composer.php'), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'Force Regenerate Thumbnails', 'slug' => 'force-regenerate-thumbnails', 'required' => true));
     $config = array('domain' => '__x__', 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', '__x__'), 'menu_title' => __('Install Plugins', '__x__'), 'installing' => __('Installing Plugin: %s', '__x__'), 'oops' => __('Something went wrong with the plugin API.', '__x__'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', '__x__'), 'plugin_activated' => __('Plugin activated successfully.', '__x__'), 'complete' => __('All plugins installed and activated successfully. %s', '__x__'), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
开发者ID:Cywaithaka,项目名称:WPAN,代码行数:7,代码来源:registration.php

示例2: my_theme_register_required_plugins

function my_theme_register_required_plugins()
{
    $plugins = array(array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'Theme Blvd Responsive Google Maps', 'slug' => 'theme-blvd-responsive-google-maps', 'required' => false), array('name' => 'LayerSlider', 'slug' => 'LayerSlider', 'source' => get_template_directory() . '/include/plugin/tgm-plugin-activation/plugins/LayerSlider.zip', 'version' => '5.1.1', 'required' => true, 'force_activation' => false, 'force_deactivation' => true));
    $theme_text_domain = 'gdl_back_office';
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
开发者ID:rinkuvantage,项目名称:puyangantemples,代码行数:7,代码来源:gdl-tgm-plugin-activation.php

示例3: charity_register_required_plugins

/**
 * Charity - Vender for lib (TGM-Plugin-Activation) activation
 *  
 * @package     charity
 * @version     v.1.0
 */
function charity_register_required_plugins()
{
    $vendorPath = get_template_directory() . '/vendor/plugins/';
    $plugins = array(array('name' => 'Charity Apps', 'slug' => 'charity-apps', 'source' => $vendorPath . 'charity-apps.zip', 'required' => true, 'force_activation' => true), array('name' => 'EasyPay', 'slug' => 'easypay', 'source' => $vendorPath . 'easypay.zip', 'required' => true, 'force_activation' => true), array('name' => 'Revolution Slider', 'slug' => 'revslider', 'source' => $vendorPath . 'revslider.zip', 'required' => true, 'force_activation' => true), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'source' => $vendorPath . 'contact-form-7.zip', 'required' => true), array('name' => 'Mailchimp', 'slug' => 'mailchimp-for-wp', 'source' => $vendorPath . 'mailchimp-for-wp.zip', 'required' => false), array('name' => 'Woocommerce', 'slug' => 'woocommerce', 'source' => $vendorPath . 'woocommerce.zip', 'required' => false, 'force_activation' => false), array('name' => 'Contact Form DB', 'slug' => 'contact-form-7-to-database-extension', 'source' => $vendorPath . 'contact-form-7-to-database-extension.zip', 'required' => false, 'force_activation' => false), array('name' => 'Events Manager', 'slug' => 'events-manager', 'source' => $vendorPath . 'events-manager.zip', 'required' => true, 'force_activation' => true), array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => $vendorPath . 'js_composer.zip', 'required' => false, 'force_activation' => false));
    $config = array('domain' => 'charity', 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'b-blog'), 'menu_title' => __('Install Plugins', 'b-blog'), 'installing' => __('Installing Plugin: %s', 'b-blog'), 'oops' => __('Something went wrong with the plugin API.', 'b-blog'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'b-blog'), 'plugin_activated' => __('Plugin activated successfully.', 'b-blog'), 'complete' => __('All plugins installed and activated successfully. %s', 'b-blog'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:13,代码来源:charity-tgm-settings.php

示例4: my_theme_register_required_plugins

/**
 * This function is hooked into tgmpa_init, which is fired within the
 * TGM_Plugin_Activation class constructor.
 */
function my_theme_register_required_plugins()
{
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'Simple Page Ordering', 'slug' => 'simple-page-ordering', 'required' => false), array('name' => 'Custom Taxonomy Sort', 'slug' => 'custom-taxonomy-sort', 'required' => false));
    // Change this to your theme text domain, used for internationalising strings
    $theme_text_domain = 'gxg_textdomain';
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => $theme_text_domain, 'default_path' => dirname(__FILE__) . '/plugins/', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. 
								Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. 
								Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. 
								Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. 
								Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility 
								with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum 
								compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. 
								Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. 
								Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:31,代码来源:tgm-activation.php

示例5: porto_register_required_plugins

function porto_register_required_plugins()
{
    // disable visual composer automatic update
    global $vc_manager;
    if ($vc_manager) {
        $vc_updater = $vc_manager->updater();
        if ($vc_updater) {
            remove_filter('upgrader_pre_download', array(&$vc_updater, 'upgradeFilterFromEnvato'));
            remove_filter('upgrader_pre_download', array(&$vc_updater, 'preUpgradeFilter'));
        }
    }
    // get master slider download url
    add_filter('axiom_plugin_updater_custom_package_download_url', 'porto_axiom_plugin_updater_custom_package_download_url');
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => porto_plugins . '/js_composer.zip', 'required' => true, 'version' => '4.9.2'), array('name' => 'Ultimate Addons for Visual Composer', 'slug' => 'Ultimate_VC_Addons', 'source' => porto_plugins . '/Ultimate_VC_Addons.zip', 'required' => true, 'version' => '3.15.0'), array('name' => 'Porto Shortcodes', 'slug' => 'porto-shortcodes', 'source' => porto_plugins . '/porto-shortcodes.zip', 'required' => true, 'version' => '1.4'), array('name' => 'Porto Widgets', 'slug' => 'porto-widgets', 'source' => porto_plugins . '/porto-widgets.zip', 'required' => true, 'version' => '1.2'), array('name' => 'Porto Content Types', 'slug' => 'porto-content-types', 'source' => porto_plugins . '/porto-content-types.zip', 'required' => true, 'version' => '1.2.2'), array('name' => 'Dynamic Featured Image', 'slug' => 'dynamic-featured-image', 'required' => true), array('name' => 'Master Slider', 'slug' => 'masterslider', 'source' => porto_plugins . '/masterslider.zip', 'required' => true, 'version' => '2.26.0'), array('name' => 'Woocommerce', 'slug' => 'woocommerce', 'required' => true), array('name' => 'Regenerate Thumbnails', 'slug' => 'regenerate-thumbnails', 'required' => true), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'Really Simple CAPTCHA', 'slug' => 'really-simple-captcha', 'required' => false), array('name' => 'WP Sitemap Page', 'slug' => 'wp-sitemap-page', 'required' => false), array('name' => 'Post Type Archive Link', 'slug' => 'post-type-archive-links', 'required' => false), array('name' => 'MailPoet Newsletters', 'slug' => 'wysija-newsletters', 'required' => false), array('name' => 'Envato Toolkit', 'slug' => 'envato-wordpress-toolkit', 'source' => porto_plugins . '/envato-wordpress-toolkit.zip', 'required' => false, 'version' => '1.7.3'));
    if (class_exists('WooCommerce')) {
        $plugins = array_merge(array(array('name' => 'Yith Woocommerce Wishlist', 'slug' => 'yith-woocommerce-wishlist', 'required' => false), array('name' => 'Yith Woocommerce Ajax Navigation', 'slug' => 'yith-woocommerce-ajax-navigation', 'required' => false), array('name' => 'Yith Woocommerce Ajax Search', 'slug' => 'yith-woocommerce-ajax-search', 'required' => false)), $plugins);
    }
    if (defined('GEODIRECTORY_VERSION')) {
        $plugins = array_merge(array(array('name' => 'GeoDirectory Porto Theme Compatibility Pack', 'slug' => 'geodirectory-porto-theme-compatibility-pack', 'source' => porto_plugins . '/geodirectory-porto-theme-compatibility-pack.zip', 'required' => true, 'version' => '1.0.0')), $plugins);
    }
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => 'porto', 'default_path' => '', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'porto'), 'menu_title' => __('Install Plugins', 'porto'), 'installing' => __('Installing Plugin: %s', 'porto'), 'oops' => __('Something went wrong with the plugin API.', 'porto'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'porto'), 'plugin_activated' => __('Plugin activated successfully.', 'porto'), 'complete' => __('All plugins installed and activated successfully. %s', 'porto'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
开发者ID:booklein,项目名称:wpbookle,代码行数:34,代码来源:plugins.php

示例6: register_required_plugins

 /**
  * Register the required plugins for The "Google Analytics Top Content" plugin.
  */
 public function register_required_plugins()
 {
     $plugins = array(array('name' => 'Google Analytics by Yoast', 'slug' => 'google-analytics-for-wordpress', 'required' => true));
     $widgets_url = '<a href="' . get_admin_url('', 'widgets.php') . '" title="' . __('Setup Widget', 'top-google-posts') . '">' . __('Setup Widget', 'top-google-posts') . '</a>';
     $config = array('domain' => 'top-google-posts', 'default_path' => '', 'parent_slug' => 'plugins.php', 'capability' => 'install_plugins', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'top-google-posts'), 'menu_title' => __('Install Plugins', 'top-google-posts'), 'installing' => __('Installing Plugin: %s', 'top-google-posts'), 'oops' => __('Something went wrong with the plugin API.', 'top-google-posts'), 'notice_can_install_required' => _n_noop('The "Google Analytics Top Content" plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'top-google-posts'), 'plugin_activated' => __('Plugin activated successfully.', 'top-google-posts'), 'complete' => __('All plugins installed and activated successfully. %s', 'top-google-posts')));
     tgmpa($plugins, $config);
 }
开发者ID:pmtarantino,项目名称:Google-Analytics-Top-Content-Widget,代码行数:10,代码来源:class-ga-top-content.php

示例7: quidus_register_required_plugins

function quidus_register_required_plugins()
{
    $plugins = array(array('name' => 'Kirki - Advanced Wordpress Customizer', 'slug' => 'Kirki', 'source' => 'https://downloads.wordpress.org/plugin/kirki.0.8.4.zip', 'required' => true, 'external_url' => '', 'force_activation' => false, 'force_deactivation' => true), array('name' => 'Contact Form 7', 'slug' => 'Contact Form 7', 'source' => 'https://downloads.wordpress.org/plugin/contact-form-7.4.1.2.zip', 'required' => false, 'external_url' => '', 'force_activation' => false, 'force_deactivation' => true), array('name' => 'Shortcodes Ultimate', 'slug' => 'Shortcodes Ultimate', 'source' => 'https://downloads.wordpress.org/plugin/shortcodes-ultimate.zip', 'required' => false, 'external_url' => '', 'force_activation' => false, 'force_deactivation' => true));
    $theme_text_domain = 'quidus';
    $config = array('domain' => 'quidus', 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'dismissable' => true, 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'quidus'), 'menu_title' => __('Install Plugins', 'quidus'), 'installing' => __('Installing Plugin: %s', 'quidus'), 'oops' => __('Something went wrong with the plugin API.', 'quidus'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'quidus'), 'notice_can_install_recommended' => _n_noop('This theme comes packaged with the following premium plugin: %1$s. enjoy:)', 'This theme comes packaged with the following premium plugin: %1$s. enjoy:)', 'quidus'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'quidus'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'quidus'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'quidus'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'quidus'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'quidus'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'quidus'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins', 'quidus'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins', 'quidus'), 'return' => __('Return to Required Plugins Installer', 'quidus'), 'plugin_activated' => __('Plugin activated successfully.', 'quidus'), 'complete' => __('All plugins installed and activated successfully. %s', 'quidus'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
开发者ID:Kovaloff,项目名称:katyparit,代码行数:7,代码来源:quidus-tgm-activate.php

示例8: x_register_theme_plugins

 function x_register_theme_plugins()
 {
     //
     // Bundled plugins.
     //
     $bundled = array('cornerstone' => array('name' => 'Cornerstone', 'slug' => 'cornerstone', 'source' => X_TEMPLATE_URL . '/framework/plugins/cornerstone.zip', 'required' => true, 'version' => '', 'force_activation' => true, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => 'cornerstone/cornerstone.php', 'x_author' => 'Themeco', 'x_description' => 'This plugin is required to run X. It provides a front end page editor and all the shortcodes used in X.', 'x_logo' => '//theme.co/media/x_extensions/200-200-no-title-cornerstone.png', 'x_manage_upgrade' => false), 'revslider' => array('name' => 'Slider Revolution', 'slug' => 'revslider', 'source' => X_TEMPLATE_URL . '/framework/plugins/revslider.zip', 'required' => false, 'version' => '4.6.93', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => 'revslider/revslider.php', 'x_author' => 'ThemePunch', 'x_description' => 'Create responsive sliders with must-see-effects, all while maintaining your search engine optimization.', 'x_logo' => '//theme.co/media/x_extensions/200-200-no-title-slider-revolution.png', 'x_manage_upgrade' => true), 'js_composer' => array('name' => 'Visual Composer', 'slug' => 'js_composer', 'source' => X_TEMPLATE_URL . '/framework/plugins/js_composer.zip', 'required' => false, 'version' => '4.5.3', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => 'js_composer/js_composer.php', 'x_author' => 'WPBakery', 'x_description' => 'We recommend using <a href="//theme.co/cornerstone/" title="Cornerstone" target="_blank">Cornerstone</a> for page building in X as it is built and managed by Themeco; however, Visual Composer is an alternate choice.', 'x_logo' => '//theme.co/media/x_extensions/200-200-no-title-visual-composer.png', 'x_manage_upgrade' => true));
     //
     // Remote plugins.
     //
     $extensions = array();
     $addons = X_Update_API::get_cached_addons();
     if (is_array($addons) && !isset($addons['error'])) {
         foreach ($addons as $ext => $data) {
             $data['force_activation'] = $data['force_activation'] == 'on' ? true : false;
             $data['force_deactivation'] = $data['force_deactivation'] == 'on' ? true : false;
             $extensions[$ext] = array('name' => $data['title'], 'slug' => $data['slug'], 'source' => $data['download_url'], 'required' => false, 'version' => $data['latest_version'], 'force_activation' => $data['force_activation'], 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => $data['plugin_file'], 'x_author' => $data['author'], 'x_description' => $data['description'], 'x_logo' => $data['logo_url'], 'x_manage_upgrade' => false);
         }
     }
     //
     // Merge bundled and remote plugins.
     //
     $plugins = array_merge($bundled, $extensions);
     //
     // TMG configuration.
     //
     $config = array('domain' => '__x__', 'default_path' => 'tgmpa-install-plugins', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', '__x__'), 'menu_title' => __('Install Plugins', '__x__'), 'installing' => __('Installing Plugin: %s', '__x__'), 'oops' => __('Something went wrong with the plugin API.', '__x__'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', '__x__'), 'plugin_activated' => __('Plugin activated successfully.', '__x__'), 'complete' => __('All plugins installed and activated successfully. %s', '__x__'), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
开发者ID:saparhadi,项目名称:morowaliweb,代码行数:28,代码来源:registration.php

示例9: jogja_include_necessary_plugins

function jogja_include_necessary_plugins()
{
    $plugins = array(array('name' => 'Regenerate Thumbnails', 'slug' => 'regenerate-thumbnails', 'required' => false), array('name' => 'Widget Import / Export', 'slug' => 'widget-importer-exporter', 'required' => false), array('name' => 'Ninja Forms', 'slug' => 'ninja-forms', 'required' => false), array('name' => 'MailChimp for WordPress', 'slug' => 'mailchimp-for-wp', 'required' => false), array('name' => 'WooCommerce', 'slug' => 'woocommerce', 'required' => false));
    $theme_text_domain = 'jogja';
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'menu' => 'jogja-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '');
    tgmpa($plugins, $config);
}
开发者ID:alispx,项目名称:jogja-starter,代码行数:7,代码来源:plugins-config.php

示例10: _actionRegisterRequiredPlugins

 /**
  * Register the required plugins for this theme.
  *
  * In this example, we register two plugins - one included with the TGMPA library
  * and one from the .org repo.
  *
  * The variable passed to tgmpa_register_plugins() should be an array of plugin
  * arrays.
  *
  * This function is hooked into tgmpa_init, which is fired within the
  * TGM_Plugin_Activation class constructor.
  */
 public function _actionRegisterRequiredPlugins()
 {
     $pluginsConfigData = Configure::read('Data.externalPlugins');
     /**
      * Array of plugin arrays. Required keys are name and slug.
      * If the source is NOT from the .org repo, then source is also required.
      */
     $plugins = array();
     foreach ($pluginsConfigData as $pluginConfigData) {
         // $pluginConfigData['source'] = GUMM_EXTERNAL_PLUGINS . $pluginConfigData['file'];
         $pluginConfigData['source'] = $pluginConfigData['file'];
         unset($pluginConfigData['file']);
         $pluginData = array_merge(array('name' => '', 'slug' => '', 'source' => '', 'required' => true, 'force_activation' => false, 'force_deactivation' => false), $pluginConfigData);
         // if ($pluginData['name'] && $pluginData['slug'] && $pluginData['source'] && is_file($pluginData['source'])) {
         if ($pluginData['name'] && $pluginData['slug'] && $pluginData['source']) {
             $plugins[] = $pluginData;
         }
     }
     /**
      * Array of configuration settings. Amend each line as needed.
      * If you want the default strings to be available under your own theme domain,
      * leave the strings uncommented.
      * Some of the strings are added into a sprintf, so see the comments at the
      * end of each line for what each argument will be.
      */
     $config = array('domain' => 'gummfw', 'default_path' => GUMM_EXTERNAL_PLUGINS, 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'gummfw'), 'menu_title' => __('Install Plugins', 'gummfw'), 'installing' => __('Installing Plugin: %s', 'gummfw'), 'oops' => __('Something went wrong with the plugin API.', 'gummfw'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'gummfw'), 'plugin_activated' => __('Plugin activated successfully.', 'gummfw'), 'complete' => __('All plugins installed and activated successfully. %s', 'gummfw')));
     tgmpa($plugins, $config);
 }
开发者ID:nikolaskarica,项目名称:bds-alliance,代码行数:40,代码来源:TgmPluginActivation.php

示例11: largo_register_required_plugins

/**
 * Register the required plugins for this theme.
 *
 * In this example, we register two plugins - one included with the TGMPA library
 * and one from the .org repo.
 *
 * The variable passed to tgmpa_register_plugins() should be an array of plugin
 * arrays.
 *
 * This function is hooked into tgmpa_init, which is fired within the
 * TGM_Plugin_Activation class constructor.
 */
function largo_register_required_plugins()
{
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'Link Roundups', 'slug' => 'link-roundups', 'source' => 'https://github.com/INN/link-roundups/archive/master.zip', 'required' => false, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => 'https://github.com/INN/link-roundups'), array('name' => 'Documentcloud', 'slug' => 'documentcloud', 'source' => 'https://github.com/documentcloud/wordpress-documentcloud/archive/master.zip', 'required' => false, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => 'https://github.com/documentcloud/wordpress-documentcloud'), array('name' => 'Disqus Comment System', 'slug' => 'disqus-comment-system', 'required' => false), array('name' => 'Better WordPress Google XML Sitemaps', 'slug' => 'bwp-google-xml-sitemaps', 'required' => false), array('name' => 'W3 Total Cache', 'slug' => 'w3-total-cache', 'required' => false), array('name' => 'Edit Flow', 'slug' => 'edit-flow', 'required' => false), array('name' => 'Co-Authors Plus', 'slug' => 'co-authors-plus', 'required' => false));
    // Change this to your theme text domain, used for internationalising strings
    $theme_text_domain = 'largo';
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_slug' => 'themes.php', 'capability' => 'edit_theme_options', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
    // Hide notices from users that can't do anything about them.
    // A future update to TGMPA intends to fix this issue on multisites.
    // @see: https://github.com/TGMPA/TGM-Plugin-Activation/pull/247
    //
    // This should be removed after TGMPA is updated to version 3.0
    if (!current_user_can('activate_plugins')) {
        TGM_Plugin_Activation::$instance->has_notices = false;
    }
}
开发者ID:NathanLawrence,项目名称:Largo,代码行数:39,代码来源:plugin-init.php

示例12: mr_tailor_theme_register_required_plugins

function mr_tailor_theme_register_required_plugins()
{
    $plugins = array(array('name' => 'WooCommerce', 'slug' => 'woocommerce', 'source' => 'http://downloads.wordpress.org/plugin/woocommerce.2.1.9.zip', 'required' => false, 'version' => '2.1.9', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'WooCommerce Header Category Image', 'slug' => 'woocommerce-header-category-image', 'source' => get_stylesheet_directory() . '/inc/plugins/woocommerce-header-category-image.zip', 'required' => false, 'version' => '1.0.0', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Envato Toolkit', 'slug' => 'envato-wordpress-toolkit-master', 'source' => get_stylesheet_directory() . '/inc/plugins/envato-wordpress-toolkit-master.zip', 'required' => false, 'version' => '1.6.2', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Visual Composer', 'slug' => 'js_composer', 'source' => get_stylesheet_directory() . '/inc/plugins/js_composer.zip', 'required' => true, 'version' => '4.1.3.1', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false, 'version' => '3.7.2'), array('name' => 'WP Retina 2x', 'slug' => 'wp-retina-2x', 'required' => false, 'version' => '1.9.2'));
    $theme_text_domain = 'mr_tailor';
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
开发者ID:apeachdev,项目名称:eyeboutique,代码行数:7,代码来源:functions.php

示例13: run

 public function run()
 {
     add_action('init', array($this, 'register_post_type'));
     add_action('tgmpa_register', function () {
         /*
          * Array of plugin arrays. Required keys are name and slug.
          * If the source is NOT from the .org repo, then source is also required.
          */
         $plugins = array(array('name' => 'Advanced Custom Fields', 'slug' => 'advanced-custom-fields', 'required' => true));
         /*
          * Array of configuration settings. Amend each line as needed.
          *
          * TGMPA will start providing localized text strings soon. If you already have translations of our standard
          * strings available, please help us make TGMPA even better by giving us access to these translations or by
          * sending in a pull-request with .po file(s) with the translations.
          *
          * Only uncomment the strings in the config array if you want to customize the strings.
          */
         $config = array('id' => 'tgmpa', 'default_path' => '', 'menu' => 'tgmpa-install-plugins', 'parent_slug' => 'themes.php', 'capability' => 'edit_theme_options', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '');
         tgmpa($plugins, $config);
     });
     add_action('widgets_init', function () {
         register_sidebar(array('name' => __('Jobify Sidebar', 'jobify'), 'id' => 'sidebar-jobify', 'description' => __('Widgets in this area will be shown on all job posts.', 'jobify'), 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>'));
     });
 }
开发者ID:bmarshall511,项目名称:jobify,代码行数:25,代码来源:JobPostType.php

示例14: x_register_theme_plugins

 function x_register_theme_plugins()
 {
     //
     // Bundled plugins.
     //
     $bundled = array('cornerstone' => array('name' => 'Cornerstone', 'slug' => 'cornerstone', 'source' => 'cornerstone.zip', 'required' => true, 'version' => '', 'force_activation' => true, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => 'cornerstone/cornerstone.php', 'x_author' => 'Themeco', 'x_description' => 'This plugin is required to run X. It provides a front end page editor and all the shortcodes used in X.', 'x_logo' => '//theme.co/media/x_extensions/200-200-no-title-cornerstone.png', 'x_manage_upgrade' => false));
     //
     // Remote plugins.
     //
     $extensions = array();
     $addons = get_site_option('x_extension_list', false);
     if (is_array($addons)) {
         foreach ($addons as $ext => $data) {
             $extensions[$ext] = array('name' => $data['title'], 'slug' => $data['slug'], 'source' => $data['package'], 'required' => false, 'version' => $data['new_version'], 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => $data['plugin'], 'x_author' => $data['author'], 'x_description' => $data['description'], 'x_logo' => $data['logo_url'], 'x_manage_upgrade' => false);
         }
     }
     //
     // Merge bundled and remote plugins.
     //
     $plugins = array_merge($bundled, $extensions);
     //
     // TMG configuration.
     //
     $config = array('domain' => '__x__', 'default_path' => X_TEMPLATE_PATH . '/framework/plugins/', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', '__x__'), 'menu_title' => __('Install Plugins', '__x__'), 'installing' => __('Installing Plugin: %s', '__x__'), 'oops' => __('Something went wrong with the plugin API.', '__x__'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', '__x__'), 'plugin_activated' => __('Plugin activated successfully.', '__x__'), 'complete' => __('All plugins installed and activated successfully. %s', '__x__'), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
开发者ID:bitflipper1,项目名称:ghcontracting,代码行数:26,代码来源:register.php

示例15: wheels_register_required_plugins

/**
 * Register the required plugins for this theme.
 *
 * In this example, we register two plugins - one included with the TGMPA library
 * and one from the .org repo.
 *
 * The variable passed to tgmpa_register_plugins() should be an array of plugin
 * arrays.
 *
 * This function is hooked into tgmpa_init, which is fired within the
 * TGM_Plugin_Activation class constructor.
 */
function wheels_register_required_plugins()
{
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'Senior Plugin', 'slug' => 'senior-plugin', 'source' => get_stylesheet_directory() . '/extensions/senior-plugin.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => get_stylesheet_directory() . '/extensions/js_composer.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Ultimate Addons for Visual Composer', 'slug' => 'Ultimate_VC_Addons', 'source' => get_stylesheet_directory() . '/extensions/ultimate_vc_addons.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Layer Slider', 'slug' => 'LayerSlider', 'source' => get_stylesheet_directory() . '/extensions/layersliderwp.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Redux Framework', 'slug' => 'redux-framework', 'required' => true), array('name' => 'The Events Calendar', 'slug' => 'the-events-calendar', 'required' => false), array('name' => 'Breadcrumb Trail', 'slug' => 'breadcrumb-trail', 'required' => false), array('name' => 'Meta Box', 'slug' => 'meta-box', 'required' => true), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'Testimonial Rotator', 'slug' => 'testimonial-rotator', 'required' => false), array('name' => 'Wordpress Importer', 'slug' => 'wordpress-importer', 'required' => false));
    // Change this to your theme text domain, used for internationalising strings
    $theme_text_domain = 'wheels';
    // messages
    $messages = array(__('If you are not able to complete plugin installation process due to server issues please install the plugins manually. All required plugins are located in "extensions" folder in your main download from Themeforest.', $theme_text_domain), sprintf(__('After you finish installing plugins go back to %s page to complete the installation.', $theme_text_domain), '<a href="' . admin_url('themes.php?page=theme_activation_options') . '" title="' . __('Theme Activation', $theme_text_domain) . '">' . __('Theme Activation', $theme_text_domain) . '</a>'));
    $final_message = '';
    foreach ($messages as $message) {
        $final_message .= sprintf('<div class="updated fade"><p>%s</p></div>', $message);
    }
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => $final_message, 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
开发者ID:selinaross,项目名称:spring-ridge,代码行数:37,代码来源:activate-plugins.php


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