Make WordPress Core


Ignore:
Timestamp:
09/27/2017 09:43:07 AM (7 years ago)
Author:
swissspidy
Message:

Upgrade/Install: Show new version number when updating a theme on Multisite.

Props afragen.
Fixes #40764.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r41584 r41611  
    34643464        'update'     => 'theme',
    34653465        'slug'       => $stylesheet,
     3466        'oldVersion' => '',
    34663467        'newVersion' => '',
    34673468    );
     
    34703471        $status['errorMessage'] = __( 'Sorry, you are not allowed to update themes for this site.' );
    34713472        wp_send_json_error( $status );
     3473    }
     3474
     3475    $theme = wp_get_theme( $stylesheet );
     3476    if ( $theme->exists() ) {
     3477        $status['oldVersion'] = $theme->get( 'Version' );
    34723478    }
    34733479
     
    35033509
    35043510        $theme = wp_get_theme( $stylesheet );
    3505         if ( $theme->get( 'Version' ) ) {
     3511        if ( $theme->exists() ) {
    35063512            $status['newVersion'] = $theme->get( 'Version' );
    35073513        }
Note: See TracChangeset for help on using the changeset viewer.