wp_script_is()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_script_is( string $handle, string $status = 'enqueued' ): bool
Описание
Дополнительные сведения об этой и похожих функциях темы см. в статье о Conditional Tags в Theme Developer Handbook.
Оригинал (английский)
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
Параметры
$handle
string
обязательный
$status
string
необязательный
= 'enqueued'
Возвращаемое значение
bool
Исходный код
wp-includes/functions-wp-scripts.php:528
function wp_script_is( $handle, $status = 'enqueued' ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
return (bool) wp_scripts()->query( $handle, $status );
}
История изменений
| Версия | Описание |
|---|---|
| 3.5.0 | 'enqueued' added as an alias of the 'queue' list. |
| 2.8.0 | Introduced. |

