wp_register_script()
just adds an entry to an array, it doesn’t do anything resource intensive. See WP_Dependencies::add()
.
Registering scripts early helps to avoid collisions, so you should do that always on wp_loaded
.
wp_register_script()
just adds an entry to an array, it doesn’t do anything resource intensive. See WP_Dependencies::add()
.
Registering scripts early helps to avoid collisions, so you should do that always on wp_loaded
.