[wp-trac] [WordPress Trac] #58665: Update the `wp_print_scripts` filter in default-filters.php to be an action
WordPress Trac
noreply at wordpress.org
Sun Jul 9 06:32:33 UTC 2023
#58665: Update the `wp_print_scripts` filter in default-filters.php to be an action
-------------------------------------------------+-------------------------
Reporter: davidbaumwald | Owner:
| davidbaumwald
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.3
Component: General | Version: 4.2
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch add-to- | Focuses:
field-guide |
-------------------------------------------------+-------------------------
Comment (by stevenlinx):
I'm indifferent to whether the field guide includes it.
My rational to add the label was that it's been modified.
Per "Publishing the Field Guide" | Core Handbook:
https://make.wordpress.org/core/handbook/tutorials/publishing-the-field-
guide/
"Ideally all new and modified hooks are noted in a bulleted list (e.g.,
4.8)."
If you look at v4.8 guide
https://make.wordpress.org/core/2017/05/26/wordpress-4-8-field-guide/
There is a "Modified Filter Hooks" section at the bottom.
In my current draft guide, I noted it as "The filter hooks
wp_print_scripts and customize_controls_print_styles have been fixed to
become action hooks."
(my understanding: a filter expects a return value, action does not; so a
third party developer may need to change their code? if their code no
longer need to expect a return value)
In this case, the original code was wrong to begin with, so it's a good
thing to let the developers know the code have been fixed?
As the owner of the ticket, if you feel it's insignificant, then feel free
to remove the label.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58665#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list