Make WordPress Core


Ignore:
Timestamp:
10/16/2025 07:59:11 PM (4 months ago)
Author:
joedolson
Message:

General: Remove support for IE conditional comments.

Remove the ability to enqueue scripts and styles wrapped in IE conditional comment tags. Conditional comment support was removed from IE in version 10 in 2012, and no core supported browser renders them in any way. IE9 has global usage approaching zero. WordPress dropped support for IE10 and below in version 4.8.

Patch adds a deprecation notice if the conditional data argument is added. Scripts and styles are not printed, and neither are their dependencies if they are not required by other non-conditional scripts. Conditional dependencies are removed from core enqueues.

Props jonsurrell, joedolson, shailu25, siliconforks, dmsnell, sabernhardt, rollybueno.
Fixes #63821.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.wp-scripts.php

    r60704 r60948  
    436436 *
    437437 * Possible values for $key and $value:
    438  * 'conditional' string Comments for IE 6, lte IE 7, etc.
     438 * 'strategy' string 'defer' or 'async'.
    439439 *
    440440 * @since 4.2.0
     441 * @since 6.9.0 Updated possible values to remove reference to 'conditional' and add 'strategy'.
    441442 *
    442443 * @see WP_Dependencies::add_data()
Note: See TracChangeset for help on using the changeset viewer.