How to get (loop through to disable unnecessary) all functions with priority '1'
attached to hook 'wp_head'
('_wp_render_title_tag'
, 'wp_enqueue_scripts'
, 'noindex'
etc.)?
It is necessary to get it automatically, so that after each new version of WordPress do not keep track of whether the priority '1'
something else.
Something like:
$array_priority_1 = [];
if (doing_action('wp_head')) {
// Here we get and iterate over all functions related to 'wp_head'
// and immediately check their priority '1'?
// suitable and added to the array '$array_priority_1'
//
// ...I do not know how to get them and check for priority
}
And here we are going through our ready array:
foreach ($array_priority_1 as ...
Thank you!