# theme_file_path

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

Тип: хук-фильтр.
Появился в версии: 4.7.0.

## Сигнатура

```php
apply_filters( 'theme_file_path', string $path, string $file )
```

## Описание

Фильтрует путь к файлу в теме.

## Параметры

- `$path` `string` — обязательный. Путь к файлу.
- `$file` `string` — обязательный. Запрашиваемый файл для поиска.

## Фильтруемое значение

Путь к файлу.

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

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

```php
return apply_filters( 'theme_file_path', $path, $file );
```

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

- 4.7.0 — Introduced.

## Связанные

Используется в: [`wp_theme_has_theme_json`](https://chugunov.pro/api-wordpress/functions/wp_theme_has_theme_json/), `WP_Theme::get_file_path`, [`get_theme_file_path`](https://chugunov.pro/api-wordpress/functions/get_theme_file_path/).

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