# print_footer_scripts()

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

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

## Сигнатура

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

## Описание

Выводит скрипты, поставленные в очередь для подвала или слишком поздно для HTML-заголовка.

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

`string[]`

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

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

```php
function print_footer_scripts() {
	global $wp_scripts, $concatenate_scripts;

	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
		return array(); // No need to run if not instantiated.
	}
	script_concat_settings();
	$wp_scripts->do_concat = $concatenate_scripts;
	$wp_scripts->do_footer_items();

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

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

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

- 2.8.0 — Introduced.

## Связанные

Использует: `WP_Scripts::do_footer_items`, `WP_Scripts::reset`, [`script_concat_settings`](https://chugunov.pro/api-wordpress/functions/script_concat_settings/), [`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_hoist_late_printed_styles`](https://chugunov.pro/api-wordpress/functions/wp_hoist_late_printed_styles/), [`_wp_footer_scripts`](https://chugunov.pro/api-wordpress/functions/_wp_footer_scripts/).

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