0
I’m running some tests on the wp_head()
of a Wordpress theme, the same uses a hooks scheme with the add_action
, i believe I understand how it works, the first parameter is the main function wp_head
and the second is the name of the function where I am calling example do_active_header
.
What happens is that by default this theme imports many unnecessary files which makes it very slow to load my page. My doubt and if I can make one add_action
more than once for the same function, as here for example:
function do_activate_header() {
/**
* Fires before the Site Activation page is loaded.
*
* Fires on the {@see 'wp_head'} action.
*
* @since 3.0.0
*/
do_action( 'activate_wp_head' );
}
add_action( 'wp_head', 'do_activate_header' );
add_action( 'wp_head_teste', 'do_activate_header' );
I want to do this way to understand exactly which files I need to import and which ones I can remove