Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_add_inline_script()

3 tags 1 category

wp_add_inline_script() — Adds extra code to a registered script. Code will only be added if the script is already in the queue. Accepts a string $data containing the code. If two or more code blocks are added to the same script $handle, they will be printed in the order they were added, i.e. the latter added code can redeclare the previous.

Inputs: $handle (string): Name of the script to add the inline script to. $data (string): String containing the JavaScript to be added. $position (string): Optional. Whether to add the inline script before the handle or after. Default ‘after’.

Returns bool: True on success, false on failure.

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…