WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/19/2016 10:26:31 AM (4 years ago)
Author:
swissspidy
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r38810 r38827  
    612612        ) );
    613613
    614         $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ) );
     614        $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 );
    615615        did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
    616616            'ajax_nonce' => wp_create_nonce( 'updates' ),
Note: See TracChangeset for help on using the changeset viewer.