function intercept_plugin_error_scrape($action, $result) { if (!$result) { return; } foreach ($this->plugins_to_deactivate as $deactivate_me) { if ("plugin-activation-error_{$deactivate_me[0]}" == $action) { Jetpack::bail_on_activation(sprintf(__('Jetpack contains the most recent version of the old “%1$s” plugin.', 'jetpack'), $deactivate_me[1]), false); } } }
/** * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook() * @static */ function plugin_activation($network_wide) { Jetpack::update_option('activated', 1); if (version_compare($GLOBALS['wp_version'], JETPACK__MINIMUM_WP_VERSION, '<')) { Jetpack::bail_on_activation(sprintf(__('Jetpack requires WordPress version %s or later.', 'jetpack'), JETPACK__MINIMUM_WP_VERSION)); } if ($network_wide) { Jetpack::state('network_nag', true); } Jetpack::plugin_initialize(); }