Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_script_is ›

Desde2.8.0
Obsoleton/a
wp_script_is ( $handle, $list = 'enqueued' )
Parâmetros: (2)
  • (string) $handle Name of the script.
    Required: Yes
  • (string) $list Optional. Status of the script to check. Default 'enqueued'. Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.
    Required: No
    Padrão: 'enqueued'
Retorna:
  • (bool) Whether the script is queued.
Definido em:
Codex:
Log de mudanças:
  • 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 https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.



Fonte

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

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