# _x()

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

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

## Сигнатура

```php
_x( string $text, string $context, string $domain = 'default' ): string
```

## Описание

Довольно часто возникают коллизии, когда похожий переводимый текст встречается более чем в двух местах, но с разным контекстом перевода.
Включив контекст в pot-файл, переводчики могут перевести эти строки по-разному.

## Параметры

- `$text` `string` — обязательный. Текст для перевода.
- `$context` `string` — обязательный. Контекстная информация для переводчиков.
- `$domain` `string` — необязательный, по умолчанию `'default'`. Текстовый домен. Уникальный идентификатор для получения переведённых строк.
  
  Значение по умолчанию: 'default'.

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

`string`

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

Файл: `wp-includes/l10n.php:409`

```php
function _x( $text, $context, $domain = 'default' ) {
	return translate_with_gettext_context( $text, $context, $domain );
}
```

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

- 2.8.0 — Introduced.

## Связанные

Использует: [`translate_with_gettext_context`](https://chugunov.pro/api-wordpress/functions/translate_with_gettext_context/).
Используется в: [`wp_admin_bar_command_palette_menu`](https://chugunov.pro/api-wordpress/functions/wp_admin_bar_command_palette_menu/), `WP_Debug_Data::get_wp_core`, [`_register_block_bindings_post_data_source`](https://chugunov.pro/api-wordpress/functions/_register_block_bindings_post_data_source/), [`_register_block_bindings_term_data_source`](https://chugunov.pro/api-wordpress/functions/_register_block_bindings_term_data_source/), [`_wp_register_default_font_collections`](https://chugunov.pro/api-wordpress/functions/_wp_register_default_font_collections/), [`_register_block_bindings_pattern_overrides_source`](https://chugunov.pro/api-wordpress/functions/_register_block_bindings_pattern_overrides_source/), [`_register_block_bindings_post_meta_source`](https://chugunov.pro/api-wordpress/functions/_register_block_bindings_post_meta_source/), `WP_Plugin_Dependencies::display_admin_notice_for_circular_dependencies`, [`wp_get_plugin_action_button`](https://chugunov.pro/api-wordpress/functions/wp_get_plugin_action_button/), `WP_Navigation_Fallback::create_default_fallback`, `WP_Locale::get_word_count_type`, `WP_Widget_Media::get_l10n_defaults`, `WP_Taxonomy::get_default_labels`, `WP_Post_Type::get_default_labels`, [`wp_list_users`](https://chugunov.pro/api-wordpress/functions/wp_list_users/), [`get_allowed_block_template_part_areas`](https://chugunov.pro/api-wordpress/functions/get_allowed_block_template_part_areas/), [`get_default_block_template_types`](https://chugunov.pro/api-wordpress/functions/get_default_block_template_types/), [`get_default_block_categories`](https://chugunov.pro/api-wordpress/functions/get_default_block_categories/), [`wpmu_new_site_admin_notification`](https://chugunov.pro/api-wordpress/functions/wpmu_new_site_admin_notification/), [`_register_core_block_patterns_and_categories`](https://chugunov.pro/api-wordpress/functions/_register_core_block_patterns_and_categories/), [`validate_theme_requirements`](https://chugunov.pro/api-wordpress/functions/validate_theme_requirements/), `Plugin_Installer_Skin::do_overwrite`, `Theme_Installer_Skin::do_overwrite`, [`wp_credits_section_title`](https://chugunov.pro/api-wordpress/functions/wp_credits_section_title/), [`get_post_states`](https://chugunov.pro/api-wordpress/functions/get_post_states/), [`validate_plugin_requirements`](https://chugunov.pro/api-wordpress/functions/validate_plugin_requirements/), [`wp_get_default_update_php_url`](https://chugunov.pro/api-wordpress/functions/wp_get_default_update_php_url/), [`taxonomy_meta_box_sanitize_cb_input`](https://chugunov.pro/api-wordpress/functions/taxonomy_meta_box_sanitize_cb_input/), [`wp_default_packages_scripts`](https://chugunov.pro/api-wordpress/functions/wp_default_packages_scripts/), [`register_and_do_post_meta_boxes`](https://chugunov.pro/api-wordpress/functions/register_and_do_post_meta_boxes/), [`_wp_privacy_statuses`](https://chugunov.pro/api-wordpress/functions/_wp_privacy_statuses/), [`wp_privacy_generate_personal_data_export_file`](https://chugunov.pro/api-wordpress/functions/wp_privacy_generate_personal_data_export_file/), `WP_Widget_Media_Gallery::__construct`, `WP_Customize_Nav_Menu_Locations_Control::content_template`, [`wp_load_press_this`](https://chugunov.pro/api-wordpress/functions/wp_load_press_this/), `WP_Widget_Media_Audio::__construct`, `WP_Widget_Media_Video::__construct`, `WP_Widget_Media_Image::__construct`, [`wp_dashboard_events_news`](https://chugunov.pro/api-wordpress/functions/wp_dashboard_events_news/), `WP_Community_Events::format_event_data_time`.

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