WordPress.org

Make WordPress Core

Changeset 50803


Ignore:
Timestamp:
05/02/2021 04:52:46 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Display plugin and theme update counts on WordPress Updates screen.

This restores the information that was previously included in a title attribute tooltip on pending updates link in the toolbar.

Follow-up to [50801].

Props sabernhardt, audrasjb, mukesh27, davidbaumwald.
Fixes #53031.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r50556 r50803  
    450450        $core_update_version = $core_updates[0]->current;
    451451    }
    452     ?>
    453 <h2><?php _e( 'Plugins' ); ?></h2>
     452
     453    $plugins_count = count( $plugins );
     454    ?>
     455<h2>
     456    <?php
     457    printf(
     458        '%s <span class="count">(%d)</span>',
     459        __( 'Plugins' ),
     460        number_format_i18n( $plugins_count )
     461    );
     462    ?>
     463</h2>
    454464<p><?php _e( 'The following plugins have new versions available. Check the ones you want to update and then click &#8220;Update Plugins&#8221;.' ); ?></p>
    455465<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-plugins" class="upgrade">
     
    603613
    604614    $form_action = 'update-core.php?action=do-theme-upgrade';
    605     ?>
    606 <h2><?php _e( 'Themes' ); ?></h2>
     615
     616    $themes_count = count( $themes );
     617    ?>
     618<h2>
     619    <?php
     620    printf(
     621        '%s <span class="count">(%d)</span>',
     622        __( 'Themes' ),
     623        number_format_i18n( $themes_count )
     624    );
     625    ?>
     626</h2>
    607627<p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click &#8220;Update Themes&#8221;.' ); ?></p>
    608628<p>
Note: See TracChangeset for help on using the changeset viewer.