# print_head_scripts()

URL: https://chugunov.pro/api-wordpress/functions/print_head_scripts/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.8.0.

## Сигнатура

```php
print_head_scripts(): string[]
```

## Описание

Откладывает скрипты, поставленные в очередь для подвала.
print_footer_scripts() вызывается в подвале для вывода этих скриптов.
См. alsowp_print_scripts()

## Возвращаемое значение

`string[]`

## Исходный код

Файл: `wp-includes/script-loader.php:2147`

```php
function print_head_scripts() {
	global $concatenate_scripts;

	if ( ! did_action( 'wp_print_scripts' ) ) {
		/** This action is documented in wp-includes/functions.wp-scripts.php */
		do_action( 'wp_print_scripts' );
	}

	$wp_scripts = wp_scripts();

	script_concat_settings();
	$wp_scripts->do_concat = $concatenate_scripts;
	$wp_scripts->do_head_items();

	/**
	 * Filters whether to print the head scripts.
	 *
	 * @since 2.8.0
	 *
	 * @param bool $print Whether to print the head scripts. Default true.
	 */
	if ( apply_filters( 'print_head_scripts', true ) ) {
		_print_scripts();
	}

	$wp_scripts->reset();
	return $wp_scripts->done;
}
```

## История изменений

- 2.8.0 — Introduced.

## Связанные

Использует: [`wp_scripts`](https://chugunov.pro/api-wordpress/functions/wp_scripts/), [`did_action`](https://chugunov.pro/api-wordpress/functions/did_action/), `WP_Scripts::do_head_items`, `WP_Scripts::reset`, [`script_concat_settings`](https://chugunov.pro/api-wordpress/functions/script_concat_settings/), [`do_action`](https://chugunov.pro/api-wordpress/functions/do_action/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: [`wp_options_connectors_render_page`](https://chugunov.pro/api-wordpress/functions/wp_options_connectors_render_page/), [`wp_font_library_render_page`](https://chugunov.pro/api-wordpress/functions/wp_font_library_render_page/), [`wp_print_head_scripts`](https://chugunov.pro/api-wordpress/functions/wp_print_head_scripts/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/print_head_scripts/
