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
This commit is contained in:
parent
95d8b4fa44
commit
2dd83960b9
|
@ -3463,6 +3463,7 @@ function wp_ajax_update_theme() {
|
||||||
$status = array(
|
$status = array(
|
||||||
'update' => 'theme',
|
'update' => 'theme',
|
||||||
'slug' => $stylesheet,
|
'slug' => $stylesheet,
|
||||||
|
'oldVersion' => '',
|
||||||
'newVersion' => '',
|
'newVersion' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -3471,6 +3472,11 @@ function wp_ajax_update_theme() {
|
||||||
wp_send_json_error( $status );
|
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' );
|
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
||||||
|
|
||||||
$current = get_site_transient( 'update_themes' );
|
$current = get_site_transient( 'update_themes' );
|
||||||
|
@ -3502,7 +3508,7 @@ function wp_ajax_update_theme() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$theme = wp_get_theme( $stylesheet );
|
$theme = wp_get_theme( $stylesheet );
|
||||||
if ( $theme->get( 'Version' ) ) {
|
if ( $theme->exists() ) {
|
||||||
$status['newVersion'] = $theme->get( 'Version' );
|
$status['newVersion'] = $theme->get( 'Version' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue