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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50803 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-05-02 16:52:46 +00:00
parent 955df634d1
commit 984c194bf2

View File

@@ -449,8 +449,18 @@ function list_plugin_updates() {
} else {
$core_update_version = $core_updates[0]->current;
}
$plugins_count = count( $plugins );
?>
<h2><?php _e( 'Plugins' ); ?></h2>
<h2>
<?php
printf(
'%s <span class="count">(%d)</span>',
__( 'Plugins' ),
number_format_i18n( $plugins_count )
);
?>
</h2>
<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>
<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-plugins" class="upgrade">
<?php wp_nonce_field( 'upgrade-core' ); ?>
@@ -602,8 +612,18 @@ function list_theme_updates() {
}
$form_action = 'update-core.php?action=do-theme-upgrade';
$themes_count = count( $themes );
?>
<h2><?php _e( 'Themes' ); ?></h2>
<h2>
<?php
printf(
'%s <span class="count">(%d)</span>',
__( 'Themes' ),
number_format_i18n( $themes_count )
);
?>
</h2>
<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>
<p>
<?php