WP_Scripts::print_inline_script

SummerySummery

Prints inline scripts registered for a specific handle.

Syntax

WP_Scripts::print_inline_script( string $handle, string $position = 'after', bool $echo = true )

ParametersParameters

$handle

(string) (Required) Name of the script to add the inline script to. Must be lowercase.

$position

(string) (Optional) Whether to add the inline script before the handle or after.

Default value: 'after'

$echo

(bool) (Optional) Whether to echo the script instead of just returning it.

Default value: true

ReturnReturn

(string|false) Script on success, false otherwise.

SourceSource

File: wp-includes/class.wp-scripts.php


			

ChangelogChangelog

Changelog
Version Description
4.5.0 Introduced.
Scroll to Top