Inline documentation for esc_attr_x() and esc_html_x(). props fjarrett, fixes #24212.
git-svn-id: https://develop.svn.wordpress.org/trunk@24825 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
438002864f
commit
ec1ae2334a
@ -205,12 +205,34 @@ function _ex( $text, $context, $domain = 'default' ) {
|
||||
echo _x( $text, $context, $domain );
|
||||
}
|
||||
|
||||
function esc_attr_x( $single, $context, $domain = 'default' ) {
|
||||
return esc_attr( translate_with_gettext_context( $single, $context, $domain ) );
|
||||
/**
|
||||
* Displays translated string with gettext context and escapes it for safe use in an attribute.
|
||||
*
|
||||
* @see esc_attr()
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param string $text Text to translate
|
||||
* @param string $context Context information for the translators
|
||||
* @param string $domain Optional. Domain to retrieve the translated text
|
||||
* @return string Translated text
|
||||
*/
|
||||
function esc_attr_x( $text, $context, $domain = 'default' ) {
|
||||
return esc_attr( translate_with_gettext_context( $text, $context, $domain ) );
|
||||
}
|
||||
|
||||
function esc_html_x( $single, $context, $domain = 'default' ) {
|
||||
return esc_html( translate_with_gettext_context( $single, $context, $domain ) );
|
||||
/**
|
||||
* Displays translated string with gettext context and escapes it for safe use in HTML output.
|
||||
*
|
||||
* @see esc_html()
|
||||
* @since 2.9.0
|
||||
*
|
||||
* @param string $text Text to translate
|
||||
* @param string $context Context information for the translators
|
||||
* @param string $domain Optional. Domain to retrieve the translated text
|
||||
* @return string Translated text
|
||||
*/
|
||||
function esc_html_x( $text, $context, $domain = 'default' ) {
|
||||
return esc_html( translate_with_gettext_context( $text, $context, $domain ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user