Make WordPress Core

Changeset 56323


Ignore:
Timestamp:
07/28/2023 05:15:57 PM (9 months ago)
Author:
westonruter
Message:

Script Loader: Delay loading comment-reply script with async loading strategy.

Props westonruter, flixos90, joemcgill, sergiomdgomes.
See #12009.
Fixes #58870.

File:
1 edited

Legend:

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

    r56314 r56323  
    10081008
    10091009    $scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 );
     1010    did_action( 'init' ) && $scripts->add_data( 'comment-reply', 'strategy', 'async' );
    10101011
    10111012    $scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", array(), '2015-05-03' );
Note: See TracChangeset for help on using the changeset viewer.