Make WordPress Core

Changeset 56033 for trunk/phpcs.xml.dist


Ignore:
Timestamp:
06/26/2023 01:40:31 PM (12 months ago)
Author:
joemcgill
Message:

Script Loader: Add support for HTML 5 "async" and "defer" attributes.

This allows developers to register scripts with an intended loading strategy by changing the $in_footer parameter of wp_register_script and wp_enqueue_script to an array that accepts both an in_footer and strategy argument. If present, the loading strategy attribute will be added to the script tag when that script is printed to the page as long as it is not a dependency of any blocking scripts, including any inline scripts attached to the script or any of its dependents.

Props 10upsimon, thekt12, westonruter, costdev, flixos90, spacedmonkey, adamsilverstein, azaozz, mukeshpanchal27, mor10, scep, wpnook, vanaf1979, Otto42.
Fixes #12009.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpcs.xml.dist

    r54703 r56033  
    6969                <!-- From DOMDocument. -->
    7070                <element value="childNodes"/>
     71                <element value="firstChild"/>
    7172                <element value="formatOutput"/>
     73                <element value="lastChild"/>
    7274                <element value="nodeName"/>
    7375                <element value="nodeType"/>
Note: See TracChangeset for help on using the changeset viewer.