Exemplo n.º 1
0
 /**
  * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
  * @static
  */
 public static function plugin_activation()
 {
     if (version_compare($GLOBALS['wp_version'], AKISMET__MINIMUM_WP_VERSION, '<')) {
         load_plugin_textdomain('akismet');
         $message = '<strong>' . sprintf(esc_html__('Akismet %s requires WordPress %s or higher.', 'akismet'), AKISMET_VERSION, AKISMET__MINIMUM_WP_VERSION) . '</strong> ' . sprintf(__('Please <a href="%1$s">upgrade WordPress</a> to a current version, or <a href="%2$s">downgrade to version 2.4 of the Akismet plugin</a>.', 'akismet'), 'https://codex.wordpress.org/Upgrading_WordPress', 'http://wordpress.org/extend/plugins/akismet/download/');
         Akismet::bail_on_activation($message);
     }
 }