Upgrade/Install: Show new version number when updating a theme on Multisite.
Props afragen. Fixes #40764. git-svn-id: https://develop.svn.wordpress.org/trunk@41611 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4a6ecbfcd0
commit
135ca36a69
|
@ -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' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue