mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Upgrade/Install: Update screen reader text counts in adminbar.
Update the hidden screen-reader-text update count in the adminbar when updates are run on the plugin or theme screens. Props pento, paulschreiber, adamsilverstein, afercia, SergeyBiryukov, sabernhardt. Fixes #29022. Built from https://develop.svn.wordpress.org/trunk@52139 git-svn-id: http://core.svn.wordpress.org/trunk@51731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2ff53354c1
commit
356fe8c2dd
@ -33,6 +33,7 @@
|
||||
var $document = $( document ),
|
||||
__ = wp.i18n.__,
|
||||
_x = wp.i18n._x,
|
||||
_n = wp.i18n._n,
|
||||
sprintf = wp.i18n.sprintf;
|
||||
|
||||
wp = wp || {};
|
||||
@ -352,8 +353,14 @@
|
||||
$appearanceNavMenuUpdateCount = $( 'a[href="themes.php"] .update-plugins' ),
|
||||
itemCount;
|
||||
|
||||
$adminBarUpdates.find( '.ab-item' ).removeAttr( 'title' );
|
||||
$adminBarUpdates.find( '.ab-label' ).text( settings.totals.counts.total );
|
||||
$adminBarUpdates.find( '.updates-available-text' ).text(
|
||||
sprintf(
|
||||
/* translators: %s: Total number of updates available. */
|
||||
_n( '%s update available', '%s updates available', settings.totals.counts.total ),
|
||||
settings.totals.counts.total
|
||||
)
|
||||
);
|
||||
|
||||
// Remove the update count from the toolbar if it's zero.
|
||||
if ( 0 === settings.totals.counts.total ) {
|
||||
|
2
wp-admin/js/updates.min.js
vendored
2
wp-admin/js/updates.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-52138';
|
||||
$wp_version = '5.9-alpha-52139';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user