예제 #1
0
파일: plugins.php 프로젝트: jeffreycai/ct21
/**
 * Register plugins with TGM Plugin Activation.
 */
function educator_register_required_plugins()
{
    $config = array('default_path' => '', 'menu' => 'tgmpa-install-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'ib-educator'), 'menu_title' => __('Install Plugins', 'ib-educator'), 'installing' => __('Installing Plugin: %s', 'ib-educator'), 'oops' => __('Something went wrong with the plugin API.', 'ib-educator'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'ib-educator'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'ib-educator'), '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.', 'ib-educator'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'ib-educator'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'ib-educator'), '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.', 'ib-educator'), '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.', 'ib-educator'), '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.', 'ib-educator'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins', 'ib-educator'), 'activate_link' => _n_noop('Begin activating plugin', 'Begin activating plugins', 'ib-educator'), 'return' => __('Return to Required Plugins Installer', 'ib-educator'), 'plugin_activated' => __('Plugin activated successfully.', 'ib-educator'), 'complete' => __('All plugins installed and activated successfully. %s', 'ib-educator'), 'nag_type' => 'updated'));
    tgmpa(educator_get_plugins(), $config);
}
예제 #2
0
/**
 * Register the recommended plugins with the TGM Plugin Activation.
 */
function educator_tgmpa_register()
{
    $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' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'ib-educator'), 'menu_title' => __('Install Plugins', 'ib-educator'), 'installing' => __('Installing Plugin: %s', 'ib-educator'), 'oops' => __('Something went wrong with the plugin API.', 'ib-educator'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'ib-educator'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'ib-educator'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %1$s plugin.', 'Sorry, but you do not have the correct permissions to install the %1$s plugins.', 'ib-educator'), '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.', 'ib-educator'), 'notice_ask_to_update_maybe' => _n_noop('There is an update available for: %1$s.', 'There are updates available for the following plugins: %1$s.', 'ib-educator'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %1$s plugin.', 'Sorry, but you do not have the correct permissions to update the %1$s plugins.', 'ib-educator'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'ib-educator'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'ib-educator'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %1$s plugin.', 'Sorry, but you do not have the correct permissions to activate the %1$s plugins.', 'ib-educator'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins', 'ib-educator'), 'update_link' => _n_noop('Begin updating plugin', 'Begin updating plugins', 'ib-educator'), 'activate_link' => _n_noop('Begin activating plugin', 'Begin activating plugins', 'ib-educator'), 'return' => __('Return to Required Plugins Installer', 'ib-educator'), 'plugin_activated' => __('Plugin activated successfully.', 'ib-educator'), 'activated_successfully' => __('The following plugin was activated successfully:', 'ib-educator'), 'plugin_already_active' => __('No action taken. Plugin %1$s was already active.', 'ib-educator'), 'plugin_needs_higher_version' => __('Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'ib-educator'), 'complete' => __('All plugins installed and activated successfully. %1$s', 'ib-educator'), 'contact_admin' => __('Please contact the administrator of this site for help.', 'ib-educator'), 'nag_type' => 'updated'));
    tgmpa(educator_get_plugins(), $config);
}