WordPress.org

Make WordPress Core

Ticket #13071: update.diff

File update.diff, 886 bytes (added by bswatson, 6 years ago)
  • src/wp-includes/update.php

     
    521521        $counts = array( 'plugins' => 0, 'themes' => 0, 'wordpress' => 0, 'translations' => 0 );
    522522
    523523        if ( $plugins = current_user_can( 'update_plugins' ) ) {
     524                wp_update_plugins(); // Check for Plugin updates
    524525                $update_plugins = get_site_transient( 'update_plugins' );
    525526                if ( ! empty( $update_plugins->response ) )
    526527                        $counts['plugins'] = count( $update_plugins->response );
     
    527528        }
    528529
    529530        if ( $themes = current_user_can( 'update_themes' ) ) {
     531                wp_update_themes(); // Check for Theme updates
    530532                $update_themes = get_site_transient( 'update_themes' );
    531533                if ( ! empty( $update_themes->response ) )
    532534                        $counts['themes'] = count( $update_themes->response );