From 2dd83960b9377372b6da9e759b6b1d8c620b2ea7 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 27 Sep 2017 09:44:45 +0000 Subject: [PATCH] Upgrade/Install: Show new version number when updating a theme on Multisite. Props afragen. Fixes #40764. Built from https://develop.svn.wordpress.org/trunk@41611 git-svn-id: http://core.svn.wordpress.org/trunk@41446 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ajax-actions.php | 8 +++++++- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 29cac97917..53fd8671d1 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -3463,6 +3463,7 @@ function wp_ajax_update_theme() { $status = array( 'update' => 'theme', 'slug' => $stylesheet, + 'oldVersion' => '', 'newVersion' => '', ); @@ -3471,6 +3472,11 @@ function wp_ajax_update_theme() { wp_send_json_error( $status ); } + $theme = wp_get_theme( $stylesheet ); + if ( $theme->exists() ) { + $status['oldVersion'] = $theme->get( 'Version' ); + } + include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); $current = get_site_transient( 'update_themes' ); @@ -3502,7 +3508,7 @@ function wp_ajax_update_theme() { } $theme = wp_get_theme( $stylesheet ); - if ( $theme->get( 'Version' ) ) { + if ( $theme->exists() ) { $status['newVersion'] = $theme->get( 'Version' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index b47a89bab1..5160552b3b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41610'; +$wp_version = '4.9-alpha-41611'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.