diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
index 86f12e1a38..9f12327da3 100644
|
a
|
b
|
function wp_ajax_update_theme() { |
| 3485 | 3485 | $status = array( |
| 3486 | 3486 | 'update' => 'theme', |
| 3487 | 3487 | 'slug' => $stylesheet, |
| | 3488 | 'oldVersion' => '', |
| 3488 | 3489 | 'newVersion' => '', |
| 3489 | 3490 | ); |
| 3490 | 3491 | |
| … |
… |
function wp_ajax_update_theme() { |
| 3493 | 3494 | wp_send_json_error( $status ); |
| 3494 | 3495 | } |
| 3495 | 3496 | |
| | 3497 | $theme = wp_get_theme( $stylesheet ); |
| | 3498 | if ( $theme->exists() ) { |
| | 3499 | $status['oldVersion'] = $theme->get( 'Version' ); |
| | 3500 | } |
| | 3501 | |
| 3496 | 3502 | include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); |
| 3497 | 3503 | |
| 3498 | 3504 | $current = get_site_transient( 'update_themes' ); |
| … |
… |
function wp_ajax_update_theme() { |
| 3524 | 3530 | } |
| 3525 | 3531 | |
| 3526 | 3532 | $theme = wp_get_theme( $stylesheet ); |
| 3527 | | if ( $theme->get( 'Version' ) ) { |
| | 3533 | if ( $theme->exists() ) { |
| 3528 | 3534 | $status['newVersion'] = $theme->get( 'Version' ); |
| 3529 | 3535 | } |
| 3530 | 3536 | |