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


PHP _n_noop函数代码示例

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


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

示例1: colabs_setup_orders

function colabs_setup_orders()
{
    $statuses = array(COLABS_ORDER_PENDING => _n_noop('Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>', 'colabsthemes'), COLABS_ORDER_FAILED => _n_noop('Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'colabsthemes'), COLABS_ORDER_COMPLETED => _n_noop('Completed <span class="count">(%s)</span>', 'Completed <span class="count">(%s)</span>', 'colabsthemes'), COLABS_ORDER_ACTIVATED => _n_noop('Activated <span class="count">(%s)</span>', 'Activated <span class="count">(%s)</span>', 'colabsthemes'));
    foreach ($statuses as $status => $translate_string) {
        register_post_status($status, array('public' => true, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => $translate_string));
    }
}
开发者ID:nickwoodland,项目名称:easysitges,代码行数:7,代码来源:theme-orders.php

示例2: register_post_statuses

 /**
  * Post statuses for payments
  * @return
  */
 private static function register_post_statuses()
 {
     $statuses = self::get_statuses();
     foreach ($statuses as $status => $label) {
         register_post_status($status, array('label' => $label, 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop($label . ' <span class="count">(%s)</span>', $label . ' <span class="count">(%s)</span>')));
     }
 }
开发者ID:danielbachhuber,项目名称:marcgratch.com,代码行数:11,代码来源:Estimate.php

示例3: 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

示例4: sunshine_addon_manager

function sunshine_addon_manager()
{
    global $sunshine;
    if (!$sunshine->is_pro()) {
        return;
    }
    $plugins = array();
    if (false === ($plugins = get_transient('sunshine_addons_manager'))) {
        $url = SUNSHINE_STORE_URL . '/?sunshine_addons_feed&pro=1';
        $feed = wp_remote_get(esc_url_raw($url), array('sslverify' => false));
        if (!is_wp_error($feed)) {
            if (isset($feed['body']) && strlen($feed['body']) > 0) {
                $addons = json_decode(wp_remote_retrieve_body($feed));
                foreach ($addons as $addon) {
                    if (empty($addon->file)) {
                        continue;
                    }
                    $plugins[] = array('name' => $addon->title, 'slug' => 'sunshine-' . $addon->slug, 'source' => $addon->file, 'required' => false, 'external_url' => $addon->url);
                }
                set_transient('sunshine_addons_manager', $plugins, 3600);
            }
        }
    }
    $config = array('default_path' => '', 'menu' => 'sunshine_addon_manager', 'parent_slug' => 'sunshine_admin', 'capability' => 'sunshine_manage_options', 'has_notices' => false, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => true, 'message' => '<div class="notice notice-info"><p>' . __('Please only install the add-ons you need. Hint: You <em>absolutely</em> do not need all of them', 'sunshine') . '</p></div>', 'strings' => array('page_title' => __('Sunshine Pro Add-on Manager', 'sunshine'), 'menu_title' => __('Add-on Manager', 'sunshine'), 'installing' => __('Installing Add-on: %s', 'sunshine'), 'oops' => __('Something went wrong with the plugin API.', 'sunshine'), '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('Begin activating plugin', 'Begin activating plugins'), 'return' => __('Return to Sunshine Pro Add-on Manager', 'sunshine'), 'plugin_activated' => __('Plugin activated successfully.', 'sunshine'), 'complete' => __('All plugins installed and activated successfully. %s', 'sunshine'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
开发者ID:sunshinephotocart,项目名称:sunshine-photo-cart,代码行数:26,代码来源:index.php

示例5: cb_register_required_plugins

 function cb_register_required_plugins()
 {
     $plugins = array(array('name' => 'Revolution Slider', 'slug' => 'revslider', 'source' => get_stylesheet_directory() . '/inc/revslider.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'WP PageNavi', 'slug' => 'wp-pagenavi', 'required' => true), array('name' => 'WooCommerce', 'slug' => 'woocommerce', 'required' => false), array('name' => 'Yoast Breadcrumbs', 'slug' => 'breadcrumbs', 'required' => true), array('name' => 'WP Retina 2x', 'slug' => 'wp-retina-2x', 'required' => false));
     $theme_text_domain = 'cb-getrends';
     $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:shuramita,项目名称:dhsd,代码行数:7,代码来源:functions.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: espresso_register_required_plugins

function espresso_register_required_plugins()
{
    $plugins = array(array('name' => 'Espresso Add-Ons', 'slug' => 'espresso-addons', 'source' => get_stylesheet_directory() . '/plugins/espresso-addons.zip', 'required' => true, 'force_deactivation' => true), array('name' => 'Slider Revolution', 'slug' => 'revslider', 'source' => get_stylesheet_directory() . '/plugins/revslider.zip', 'required' => false), array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => get_stylesheet_directory() . '/plugins/js_composer.zip', 'required' => false));
    $theme_text_domain = 'espresso';
    $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)));
    tgmpa($plugins, $config);
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:7,代码来源:functions.php

示例8: 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

示例9: 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

示例10: md_required_plugins

 function md_required_plugins()
 {
     $plugins = array(array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => true), array('name' => 'Woocommerce', 'slug' => 'woocommerce', 'required' => false), array('name' => 'oAuth Twitter Feed for Developers', 'slug' => 'oauth-twitter-feed-for-developers', 'required' => true), array('name' => 'Breadcrumb NavXT', 'slug' => 'breadcrumb-navxt', 'required' => true), array('name' => 'Revolution Slider', 'slug' => 'revslider', 'source' => MD_THEME_URI . '/framework/plugins/lib/revslider.zip', 'required' => true, 'version' => '4.3.8'));
     $theme_text_domain = MD_THEME_NAME;
     $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', MD_THEME_NAME), 'menu_title' => __('Install Plugins', MD_THEME_NAME), 'installing' => __('Installing Plugin: %s', MD_THEME_NAME), 'oops' => __('Something went wrong with the plugin API.', MD_THEME_NAME), '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', MD_THEME_NAME), 'plugin_activated' => __('Plugin activated successfully.', MD_THEME_NAME), 'complete' => __('All plugins installed and activated successfully. %s', MD_THEME_NAME), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
开发者ID:Beutiste,项目名称:wordpress,代码行数:7,代码来源:config.php

示例11: registerOrderStatuses

 public function registerOrderStatuses()
 {
     $statuses = Status::getStatuses();
     foreach ($statuses as $status => $label) {
         $this->wp->registerPostStatus($status, array('label' => $label, 'public' => false, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop($label . ' <span class="count">(%s)</span>', $label . ' <span class="count">(%s)</span>', 'jigoshop')));
     }
 }
开发者ID:jigoshop,项目名称:Jigoshop2,代码行数:7,代码来源:Order.php

示例12: 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

示例13: olr_new_post_status

 function olr_new_post_status()
 {
     register_post_status('confirmed', array('label' => 'Confirmed', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Confirmed <span class="count">(%s)</span>', 'Confirmed <span class="count">(%s)</span>')));
     register_post_status('closed', array('label' => 'Closed', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Closed <span class="count">(%s)</span>', 'Closed <span class="count">(%s)</span>')));
     register_post_status('pending', array('label' => 'Pending', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>')));
     register_post_status('enquiry', array('label' => 'Enquiry', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Enquiry <span class="count">(%s)</span>', 'Enquiry <span class="count">(%s)</span>')));
 }
开发者ID:dridri51,项目名称:wordpress_workflow,代码行数:7,代码来源:admin.php

示例14: mytheme_require_plugins

function mytheme_require_plugins()
{
    $plugins = array(array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'SEO by yeast', 'slug' => 'wordpress-seo', 'required' => false));
    $config = array('id' => 'mytheme-tgmpa', 'default_path' => get_stylesheet_directory() . '/lib/plugins/', 'menu' => 'mytheme-install-required-plugins', 'has_notices' => true, 'dismissable' => false, 'dismiss_msg' => 'This Theme requires these plugin, Install it.', 'is_automatic' => true, 'message' => '<!--Hey there.-->', 'strings' => array('page_title' => __('Install Required Plugins', 'tgmpa'), 'menu_title' => __('Install Plugins', 'tgmpa'), 'installing' => __('Installing Plugin: %s', 'tgmpa'), 'oops' => __('Something went wrong with the plugin API.', 'tgmpa'), '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('Begin activating plugin', 'Begin activating plugins'), 'return' => __('Return to Required Plugins Installer', 'tgmpa'), 'plugin_activated' => __('Plugin activated successfully.', 'tgmpa'), 'complete' => __('All plugins installed and activated successfully. %s', 'tgmpa'), 'nag_type' => 'updated'));
    // The array of message strings that TGM Plugin Activation uses
    tgmpa($plugins, $config);
}
开发者ID:amrit115,项目名称:oriana-child,代码行数:7,代码来源:functions.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


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