Where is default wp_head() implemented?

Is there somewhere I can see this
default implementation?

wp_head() function simply triggers the wp_head action hook that runs all callback functions that were added to this hook using add_action('wp_head','callback_function');
So there is no default implementation.

Can this default implementation be “turned off”?

Like we said before since there is no default implementation you need to find the add_action’s that hook to wp_head and remove them using remove_action for example if this is the add_action:

add_action('wp_head','callback_function');

then to remove it just add

remove_action('wp_head','callback_function');

Can the “Color Options” option be disabled in the admin screen for the theme?

I’m assuming that your theme as some kind of options panel that let you chose the color options, so to disable it it depends on the theme it self but it should be in one of the theme files, knowing what theme you are talking about would help.

Update

there are some action by defult running when wp_head is fired and to remove them just use:

remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);

other then that look for add_action('wp_head' ... in theme files and plugins.

Leave a Comment