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:2165
src/wp-admin/includes/media.php:587
src/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
Problem
In
wp-admin/includes/admin-filters.phpat line 56,add_filter()is used to register a callback on theadmin_print_styleshook, but this hook is fired withdo_action()— making it an action, not a filter.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:674Fix
Change
add_filter()toadd_action(). Functionally equivalent (sinceadd_action()callsadd_filter()internally), but semantically correct.Related to https://core.trac.wordpress.org/ticket/64224