wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_script_is › WordPress Function

Od2.8.0
Przestarzałyn/a
wp_script_is ( $handle, $status = 'enqueued' )
Parametry: (2)
  • (string) $handle Name of the script.
    Wymagane: Tak
  • (string) $status Optional. Status of the script to check. Default 'enqueued'. Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.
    Wymagane: Nie
    Domyślny: 'enqueued'
Powrót:
  • (bool) Whether the script is queued.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 3.5.0

Determines whether a script has been added to the queue.

For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.


Źródło

function wp_script_is( $handle, $status = 'enqueued' ) {
	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );

	return (bool) wp_scripts()->query( $handle, $status );
}