forked from WordPress/wordpress-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationhas-fixHas a fix/PR upstream is openedHas a fix/PR upstream is openedverifiedIssue is manually verified.Issue is manually verified.
Milestone
Description
Problem
In wp-admin/includes/admin-filters.php at line 56, add_filter() is used to register a callback on the admin_print_styles hook, but this hook is fired with do_action() — making it an action, not a filter.
add_filter( 'admin_print_styles', 'wp_resource_hints', 1 );Where the hook fires
src/wp-admin/admin-header.php:137—do_action( 'admin_print_styles' )src/wp-admin/includes/template.php:2165src/wp-admin/includes/media.php:587src/wp-includes/class-wp-customize-widgets.php:674
Fix
Change add_filter() to add_action(). Functionally equivalent (since add_action() calls add_filter() internally), but semantically correct.
Related to https://core.trac.wordpress.org/ticket/64224
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationhas-fixHas a fix/PR upstream is openedHas a fix/PR upstream is openedverifiedIssue is manually verified.Issue is manually verified.