WordPress.org

Make WordPress Core

Ticket #40764: 40764-2.diff

File 40764-2.diff, 759 bytes (added by afragen, 3 years ago)
  • wp-admin/includes/ajax-actions.php

    diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
    index a2e829bf65..a9a09c5e43 100644
    a b function wp_ajax_update_theme() { 
    34623462        $status     = array(
    34633463                'update'     => 'theme',
    34643464                'slug'       => $stylesheet,
     3465                'oldVersion' => '',
    34653466                'newVersion' => '',
    34663467        );
    34673468
    function wp_ajax_update_theme() { 
    35003501                        wp_send_json_error( $status );
    35013502                }
    35023503
     3504                if ( ! empty( $upgrader->skin->theme_info ) ) {
     3505                        $status['oldVersion'] = $upgrader->skin->theme_info->get( 'Version' );
     3506                }
     3507
    35033508                $theme = wp_get_theme( $stylesheet );
    35043509                if ( $theme->get( 'Version' ) ) {
    35053510                        $status['newVersion'] = $theme->get( 'Version' );