Glossary Term
wp_enqueue_script()
wp_enqueue_script() — Enqueues a script. Registers the script if $src provided (does NOT overwrite), and enqueues it.
Inputs: $handle (string): Name of the script. Should be unique. $src (string): Full URL of the script, or path of the script relative to the WordPress root directory. Default empty. $deps (string[]): Optional. An array of registered script handles this script depends on. Default empty array. $ver (string|bool|null): Optional. String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added. $args (array|bool): Optional. An array of extra args for the script. Default empty array. Otherwise, it may be a boolean in which case it determines whether the script is printed in the footer. Default false. Field $strategy (string): Optional. If provided, may be either ‘defer’ or ‘async’. Field $in_footer (bool): Optional. Whether to print the script in the footer. Default ‘false’. Field $fetchpriority (string): Optional. The fetch priority for the script. Default ‘auto’. Field $module_dependencies (array): Optional. IDs for module dependencies loaded via dynamic import. Default empty array. For the full data format, see the $deps param of wp_register_script_module().
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
