Make WordPress Core


Ignore:
Timestamp:
05/05/2009 07:43:53 PM (17 years ago)
Author:
markjaquith
Message:

_a(), _ea(), _xa(), attr() are now esc_attr(), esc_attr_e(), esc_attr_x(), esc_attr() -- still short, but less cryptic. see #9650

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r11194 r11204  
    109109 *
    110110 * @see translate() An alias of translate()
    111  * @see attr()
     111 * @see esc_attr()
    112112 * @since 2.8.0
    113113 *
     
    116116 * @return string Translated text
    117117 */
    118 function _a( $text, $domain = 'default' ) {
    119         return attr( translate( $text, $domain ) );
     118function esc_attr__( $text, $domain = 'default' ) {
     119        return esc_attr( translate( $text, $domain ) );
    120120}
    121121
     
    137137 *
    138138 * @see translate() Echos returned translate() string
    139  * @see attr()
     139 * @see esc_attr()
    140140 * @since 2.8.0
    141141 *
     
    143143 * @param string $domain Optional. Domain to retrieve the translated text
    144144 */
    145 function _ea( $text, $domain = 'default' ) {
    146         echo attr( translate( $text, $domain ) );
     145function esc_attr_e( $text, $domain = 'default' ) {
     146        echo esc_attr( translate( $text, $domain ) );
    147147}
    148148
     
    174174}
    175175
    176 function _xa( $single, $context, $domain = 'default' ) {
    177         return attr( translate_with_gettext_context( $single, $context, $domain ) );
     176function esc_attr_x( $single, $context, $domain = 'default' ) {
     177        return esc_attr( translate_with_gettext_context( $single, $context, $domain ) );
    178178}
    179179
Note: See TracChangeset for help on using the changeset viewer.