mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
Upgrade/Install: Refresh update counts after page load.
By enqueuing the updates script in the footer and passing the number of available updates to it after page load, the update bubbles will be more accurate. Props ocean90, swissspidy. Fixes #13071. git-svn-id: https://develop.svn.wordpress.org/trunk@38827 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -611,7 +611,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
'ays' => __('Are you sure you want to install this plugin?')
|
||||
) );
|
||||
|
||||
$scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ) );
|
||||
$scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
|
||||
'ajax_nonce' => wp_create_nonce( 'updates' ),
|
||||
'l10n' => array(
|
||||
|
||||
Reference in New Issue
Block a user