Gets data for inline scripts registered for a specific handle.
Parameters
$handle
stringrequired- Name of the script to get data for. Must be lowercase.
$position
stringoptional- The position of the inline script.
Default:
null
Source
private function has_inline_script( $handle, $position = null ) {
if ( $position && in_array( $position, array( 'before', 'after' ), true ) ) {
return (bool) $this->get_data( $handle, $position );
}
return (bool) ( $this->get_data( $handle, 'before' ) || $this->get_data( $handle, 'after' ) );
}
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.