# includes_url()

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

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

## Сигнатура

```php
includes_url( string $path = '', string|null $scheme = null ): string
```

## Описание

Получает URL каталога includes.

## Параметры

- `$path` `string` — необязательный, по умолчанию `''`. Путь относительно URL каталога includes.
- `$scheme` `string|null` — необязательный, по умолчанию `null`. Схема, задающая контекст URL каталога includes. Принимает 'http', 'https' или 'relative'.

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

`string`

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

Файл: `wp-includes/link-template.php:3621`

```php
function includes_url( $path = '', $scheme = null ) {
	$url = site_url( '/' . WPINC . '/', $scheme );

	if ( $path && is_string( $path ) ) {
		$url .= ltrim( $path, '/' );
	}

	/**
	 * Filters the URL to the includes directory.
	 *
	 * @since 2.8.0
	 * @since 5.8.0 The `$scheme` parameter was added.
	 *
	 * @param string      $url    The complete URL to the includes directory including scheme and path.
	 * @param string      $path   Path relative to the URL to the wp-includes directory. Blank string
	 *                            if no path is specified.
	 * @param string|null $scheme Scheme to give the includes URL context. Accepts
	 *                            'http', 'https', 'relative', or null. Default null.
	 */
	return apply_filters( 'includes_url', $url, $path, $scheme );
}
```

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

- 2.6.0 — Introduced.

## Связанные

Использует: [`site_url`](https://chugunov.pro/api-wordpress/functions/site_url/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: [`wp_default_script_modules`](https://chugunov.pro/api-wordpress/functions/wp_default_script_modules/), [`get_block_asset_url`](https://chugunov.pro/api-wordpress/functions/get_block_asset_url/), [`do_favicon`](https://chugunov.pro/api-wordpress/functions/do_favicon/), [`wp_register_tinymce_scripts`](https://chugunov.pro/api-wordpress/functions/wp_register_tinymce_scripts/), [`wp_tinymce_inline_scripts`](https://chugunov.pro/api-wordpress/functions/wp_tinymce_inline_scripts/), [`wp_get_code_editor_settings`](https://chugunov.pro/api-wordpress/functions/wp_get_code_editor_settings/), `_WP_Editors::get_baseurl`, `_WP_Editors::default_settings`, [`the_embed_site_title`](https://chugunov.pro/api-wordpress/functions/the_embed_site_title/), [`print_embed_scripts`](https://chugunov.pro/api-wordpress/functions/print_embed_scripts/), [`get_post_embed_html`](https://chugunov.pro/api-wordpress/functions/get_post_embed_html/), [`wpview_media_sandbox_styles`](https://chugunov.pro/api-wordpress/functions/wpview_media_sandbox_styles/), [`wp_ajax_parse_embed`](https://chugunov.pro/api-wordpress/functions/wp_ajax_parse_embed/), [`_thickbox_path_admin_subfolder`](https://chugunov.pro/api-wordpress/functions/_thickbox_path_admin_subfolder/), [`translate_smiley`](https://chugunov.pro/api-wordpress/functions/translate_smiley/), `WP_Widget_RSS::widget`, [`wp_mime_type_icon`](https://chugunov.pro/api-wordpress/functions/wp_mime_type_icon/), [`wp_default_scripts`](https://chugunov.pro/api-wordpress/functions/wp_default_scripts/).

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