Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #58394, comment 10


Ignore:
Timestamp:
06/08/2023 06:49:20 AM (18 months ago)
Author:
dd32
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58394, comment 10

    v1 v2  
    1717}}}
    1818
    19 It appears that registering a style that is enqueued, doesn't actually dequeue the style, just removes the data and relies upon script-loader to skip over it when outputting on the page. It appears that `WP_Scripts` relies upon `WP_Dependencies::do_item()` to short-circuit when processing a no-longer-registered item:
     19It appears that **de**registering a style that is enqueued, doesn't actually dequeue the style, just removes the data and relies upon script-loader to skip over it when outputting on the page. It appears that `WP_Scripts` relies upon `WP_Dependencies::do_item()` to short-circuit when processing a no-longer-registered item:
    2020https://github.com/WordPress/wordpress-develop/blob/e8846318cf9a4c8d012ae32b4de9a51655237a24/src/wp-includes/class-wp-dependencies.php#LL159C1-L161C2
    2121