diff --git a/class-tgm-plugin-activation.php b/class-tgm-plugin-activation.php index 6ae71d3c..7f70bad9 100755 --- a/class-tgm-plugin-activation.php +++ b/class-tgm-plugin-activation.php @@ -261,6 +261,81 @@ public function __construct() { // Set the current WordPress version. $this->wp_version = $GLOBALS['wp_version']; + // Load class strings. + $this->strings = array( + 'page_title' => __( 'Install Required Plugins', 'tgmpa' ), + 'menu_title' => __( 'Install Plugins', 'tgmpa' ), + /* translators: %s: plugin name. */ + 'installing' => __( 'Installing Plugin: %s', 'tgmpa' ), + /* translators: %s: plugin name. */ + 'updating' => __( 'Updating Plugin: %s', 'tgmpa' ), + 'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ), + /* translators: 1: plugin name(s). */ + 'notice_can_install_required' => _n_noop( + 'This theme requires the following plugin: %1$s.', + 'This theme requires the following plugins: %1$s.', + 'tgmpa' + ), + /* translators: 1: plugin name(s). */ + 'notice_can_install_recommended' => _n_noop( + 'This theme recommends the following plugin: %1$s.', + 'This theme recommends the following plugins: %1$s.', + 'tgmpa' + ), + /* translators: 1: plugin name(s). */ + '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.', + 'tgmpa' + ), + /* translators: 1: plugin name(s). */ + '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.', + 'tgmpa' + ), + /* translators: 1: plugin name(s). */ + 'notice_can_activate_required' => _n_noop( + 'The following required plugin is currently inactive: %1$s.', + 'The following required plugins are currently inactive: %1$s.', + 'tgmpa' + ), + /* translators: 1: plugin name(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.', + 'tgmpa' + ), + 'install_link' => _n_noop( + 'Begin installing plugin', + 'Begin installing plugins', + 'tgmpa' + ), + 'update_link' => _n_noop( + 'Begin updating plugin', + 'Begin updating plugins', + 'tgmpa' + ), + 'activate_link' => _n_noop( + 'Begin activating plugin', + 'Begin activating plugins', + 'tgmpa' + ), + 'return' => __( 'Return to Required Plugins Installer', 'tgmpa' ), + 'dashboard' => __( 'Return to the Dashboard', 'tgmpa' ), + 'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ), + 'activated_successfully' => __( 'The following plugin was activated successfully:', 'tgmpa' ), + /* translators: 1: plugin name. */ + 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'tgmpa' ), + /* translators: 1: plugin name. */ + 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'tgmpa' ), + /* translators: 1: dashboard link. */ + 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'tgmpa' ), + 'dismiss' => __( 'Dismiss this notice', 'tgmpa' ), + 'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'tgmpa' ), + 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'tgmpa' ), + ); + // Announce that the class is ready, and pass the object (for advanced use). do_action_ref_array( 'tgmpa_init', array( $this ) ); @@ -335,81 +410,6 @@ public function init() { return; } - // Load class strings. - $this->strings = array( - 'page_title' => __( 'Install Required Plugins', 'tgmpa' ), - 'menu_title' => __( 'Install Plugins', 'tgmpa' ), - /* translators: %s: plugin name. */ - 'installing' => __( 'Installing Plugin: %s', 'tgmpa' ), - /* translators: %s: plugin name. */ - 'updating' => __( 'Updating Plugin: %s', 'tgmpa' ), - 'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ), - /* translators: 1: plugin name(s). */ - 'notice_can_install_required' => _n_noop( - 'This theme requires the following plugin: %1$s.', - 'This theme requires the following plugins: %1$s.', - 'tgmpa' - ), - /* translators: 1: plugin name(s). */ - 'notice_can_install_recommended' => _n_noop( - 'This theme recommends the following plugin: %1$s.', - 'This theme recommends the following plugins: %1$s.', - 'tgmpa' - ), - /* translators: 1: plugin name(s). */ - '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.', - 'tgmpa' - ), - /* translators: 1: plugin name(s). */ - '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.', - 'tgmpa' - ), - /* translators: 1: plugin name(s). */ - 'notice_can_activate_required' => _n_noop( - 'The following required plugin is currently inactive: %1$s.', - 'The following required plugins are currently inactive: %1$s.', - 'tgmpa' - ), - /* translators: 1: plugin name(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.', - 'tgmpa' - ), - 'install_link' => _n_noop( - 'Begin installing plugin', - 'Begin installing plugins', - 'tgmpa' - ), - 'update_link' => _n_noop( - 'Begin updating plugin', - 'Begin updating plugins', - 'tgmpa' - ), - 'activate_link' => _n_noop( - 'Begin activating plugin', - 'Begin activating plugins', - 'tgmpa' - ), - 'return' => __( 'Return to Required Plugins Installer', 'tgmpa' ), - 'dashboard' => __( 'Return to the Dashboard', 'tgmpa' ), - 'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ), - 'activated_successfully' => __( 'The following plugin was activated successfully:', 'tgmpa' ), - /* translators: 1: plugin name. */ - 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'tgmpa' ), - /* translators: 1: plugin name. */ - 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'tgmpa' ), - /* translators: 1: dashboard link. */ - 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'tgmpa' ), - 'dismiss' => __( 'Dismiss this notice', 'tgmpa' ), - 'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'tgmpa' ), - 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'tgmpa' ), - ); - do_action( 'tgmpa_register' ); /* After this point, the plugins should be registered and the configuration set. */