Make WordPress Core

Ticket #39794: 39794.3.patch

File 39794.3.patch, 2.3 KB (added by sebastian.pisula, 3 years ago)
  • wp-admin/menu.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    225225}
    226226
    227227$count = '';
    228 if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) {
     228if ( ! is_multisite() ) {
    229229        if ( ! isset( $update_data ) ) {
    230230                $update_data = wp_get_update_data();
    231231        }
  • wp-includes/update.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    688688                'translations' => 0,
    689689        );
    690690
    691         $plugins = current_user_can( 'update_plugins' );
    692 
    693         if ( $plugins ) {
    694                 $update_plugins = get_site_transient( 'update_plugins' );
     691        $update_plugins = get_site_transient( 'update_plugins' );
    695692
    696                 if ( ! empty( $update_plugins->response ) ) {
    697                         $counts['plugins'] = count( $update_plugins->response );
    698                 }
     693        if ( ! empty( $update_plugins->response ) ) {
     694                $counts['plugins'] = count( $update_plugins->response );
    699695        }
    700696
    701         $themes = current_user_can( 'update_themes' );
    702 
    703         if ( $themes ) {
    704                 $update_themes = get_site_transient( 'update_themes' );
     697        $update_themes = get_site_transient( 'update_themes' );
    705698
    706                 if ( ! empty( $update_themes->response ) ) {
    707                         $counts['themes'] = count( $update_themes->response );
    708                 }
     699        if ( ! empty( $update_themes->response ) ) {
     700                $counts['themes'] = count( $update_themes->response );
    709701        }
    710702
    711         $core = current_user_can( 'update_core' );
    712 
    713         if ( $core && function_exists( 'get_core_updates' ) ) {
     703        if ( function_exists( 'get_core_updates' ) ) {
    714704                $update_wordpress = get_core_updates( array( 'dismissed' => false ) );
    715705
    716706                if ( ! empty( $update_wordpress )
    717707                        && ! in_array( $update_wordpress[0]->response, array( 'development', 'latest' ), true )
    718                         && current_user_can( 'update_core' )
    719708                ) {
    720709                        $counts['wordpress'] = 1;
    721710                }
    722711        }
    723712
    724         if ( ( $core || $plugins || $themes ) && wp_get_translation_updates() ) {
     713        if ( wp_get_translation_updates() ) {
    725714                $counts['translations'] = 1;
    726715        }
    727716