Changeset 11103 for trunk/wp-includes/l10n.php
- Timestamp:
- 04/27/2009 09:58:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/l10n.php
r11083 r11103 107 107 108 108 /** 109 * Retrieves the translation of $text and escapes it for safe use in an attribute. 110 * If there is no translation, or the domain isn't loaded the original text is returned. 111 * 112 * @see translate() An alias of translate() 113 * @see attr() 114 * @since 2.8.0 115 * 116 * @param string $text Text to translate 117 * @param string $domain Optional. Domain to retrieve the translated text 118 * @return string Translated text 119 */ 120 function _a( $text, $domain = 'default' ) { 121 return attr( translate( $text, $domain ) ); 122 } 123 124 /** 109 125 * Displays the returned translated text from translate(). 110 126 * … … 117 133 function _e( $text, $domain = 'default' ) { 118 134 echo translate( $text, $domain ); 135 } 136 137 /** 138 * Displays translated text that has been escaped for safe use in an attribute. 139 * 140 * @see translate() Echos returned translate() string 141 * @see attr() 142 * @since 2.8.0 143 * 144 * @param string $text Text to translate 145 * @param string $domain Optional. Domain to retrieve the translated text 146 */ 147 function _ea( $text, $domain = 'default' ) { 148 echo attr( translate( $text, $domain ) ); 119 149 } 120 150 … … 144 174 function _x( $single, $context, $domain = 'default' ) { 145 175 return translate_with_gettext_context( $single, $context, $domain ); 176 } 177 178 function _xa( $single, $context, $domain = 'default' ) { 179 return attr( translate_with_gettext_context( $single, $context, $domain ) ); 146 180 } 147 181
Note: See TracChangeset
for help on using the changeset viewer.