Make WordPress Core

Changes between Version 3 and Version 5 of Ticket #64846


Ignore:
Timestamp:
03/12/2026 12:50:34 AM (2 months ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #64846

    • Property Keywords has-patch has-unit-tests needs-testing added
  • Ticket #64846 – Description

    v3 v5  
    7979If the `init` priority of `wp_load_classic_theme_block_styles_on_demand()` is changed to `-1` then this fixes the problem, but this is not the ideal solution since a theme/plugin could always register a style earlier during the `init` action (e.g. `PHP_INT_MIN`). Note that the `init` action is the earliest point to register a style safely since `_wp_scripts_maybe_doing_it_wrong()` will issue a warning otherwise. Nevertheless, the better solution would be to not use the `init` action at all, but rather to use the `wp_default_styles` action (with a low priority) so that we'll be better guaranteed that the filters will have been added.
    8080
     81Note: There are no relevant occurrences of `wp_load_classic_theme_block_styles_on_demand()` in indexed plugins or themes:
     82
     83* Plugins: https://veloria.dev/search/1be0326b-db2f-4c25-af42-fa3dd8732221
     84* Themes: https://veloria.dev/search/f864055c-585c-4510-9045-4f02639d5906
     85
     86So there is not a concern for back-compat for unhooking the function at `init`.
     87
    8188== Reproduction ==
    8289