About

With `wp_register_script` it is possible to make WP aware of a script without actually loading it. It can later be loaded with `wp_enqueue_script`, but will also automatically load when another script is enqueued that depends on that script.

With wp_register_script it is possible to make WP aware of a script without actually loading it. It can later be loaded with wp_enqueue_script, but will also automatically load when another script is enqueued that depends on that script.

In other words: this function is especially useful when there are dependencies between scripts and not all scripts will be loaded on all pages. WP will then sort out which scripts to load.

history | excerpt history