From 05fa6879ce22fd8cc80130a501e304689e8ae1d6 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 4 Apr 2015 14:19:27 +0000 Subject: [PATCH] Add an `@see` mention for `Plugin_Upgrader`, plus spacing to the `wp_ajax_update_plugin()` delcaration. See #31888. Built from https://develop.svn.wordpress.org/trunk@32006 git-svn-id: http://core.svn.wordpress.org/trunk@31985 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ajax-actions.php | 6 ++++++ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index c3f86de67e..bfcfc3798c 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -2881,6 +2881,8 @@ function wp_ajax_destroy_sessions() { * AJAX handler for updating a plugin. * * @since 4.2.0 + * + * @see Plugin_Upgrader */ function wp_ajax_update_plugin() { $plugin = urldecode( $_POST['plugin'] ); @@ -2916,6 +2918,7 @@ function wp_ajax_update_plugin() { if ( is_array( $result ) ) { $plugin_update_data = current( $result ); + /* * If the `update_plugins` site transient is empty (e.g. when you update * two plugins in quick succession before the transient repopulates), @@ -2927,10 +2930,13 @@ function wp_ajax_update_plugin() { if ( $plugin_update_data === true ) { wp_send_json_error( $status ); } + $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); + if ( $plugin_data['Version'] ) { $status['newVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] ); } + wp_send_json_success( $status ); } else if ( is_wp_error( $result ) ) { $status['error'] = $result->get_error_message(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 9ddd0835df..70ec26d0a6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta4-32005'; +$wp_version = '4.2-beta4-32006'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.