_ex()WP 3.0.0

Displays translated text (string) with specified context.

This function simply displays what _x() retrieve. For more detailed information about context translation, see the description of _x().

Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.

Uses: _x()
1 time — 0.00004 sec (very fast) | 50000 times — 0.14 sec (very fast) | PHP 7.1.2, WP 4.7.3

No Hooks.


null. Nothing (null). Displays translated text or original text if the string could not be translated.


<?php _ex( $text, $context, $domain ); ?>
$text(string) (required)
Text to translate.
$context(string) (required)
Context information for the translators.
Text domain. Unique identifier for retrieving translated strings.
Default: 'default'



#1 Display the translated string in the specified context

Here translates the string Format in the context of post format.

<?php _ex( 'Format', 'post format', 'text_domain' ); ?>

Now, for example, if we translate to Russian, this code will display the translation of Format > Формат.


Since 3.0.0 Introduced.

_ex() code WP 6.4.1

function _ex( $text, $context, $domain = 'default' ) {
	echo _x( $text, $context, $domain );