}
protected function _list( $_, $format ) {
+ // Force WordPress to check for updates
+ call_user_func( $this->upgrade_refresh );
+
$values = array(
'format' => 'table',
'fields' => $this->fields
// Load wp-config.php code, in the global scope
eval( WP_CLI::get_runner()->get_wp_config_code() );
-// Simulate a /wp-admin/ page load
-$_SERVER['PHP_SELF'] = '/wp-admin/index.php';
-define( 'WP_ADMIN', true );
-define( 'WP_NETWORK_ADMIN', false );
-define( 'WP_USER_ADMIN', false );
-
// Load Core, mu-plugins, plugins, themes etc.
require WP_CLI_ROOT . '/php/wp-settings-cli.php';
// Fix memory limit. See http://core.trac.wordpress.org/ticket/14889
@ini_set( 'memory_limit', -1 );
+// Load all the admin APIs, for convenience
require ABSPATH . 'wp-admin/includes/admin.php';
-do_action( 'admin_init' );
WP_CLI::get_runner()->after_wp_load();