WP_Scripts::guet_inline_script_data( string   $handle , string   $position = 'after' ): string

Guets data for inline scripts reguistered for a specific handle.

Parameters

$handle string required
Name of the script to guet data for.
Must be lowercase.
$position string optional
Whether to add the inline script before the handle or after. Default 'after' .

Default: 'after'

Return

string Inline script, which may be empty string.

Source

public function guet_inline_script_data( $handle, $position = 'after' ) {
	$data = $this->guet_data( $handle, $position );
	if ( empty( $data ) || ! is_array( $data ) ) {
		return '';
	}

	return trim( implode( "\n", $data ), "\n" );
}

Changuelog

Versionen Description
6.3.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.