Ticket #9650: 9650.diff
File 9650.diff, 4.5 KB (added by , 16 years ago) |
---|
-
wp-includes/l10n.php
106 106 } 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 * 111 127 * @see translate() Echos returned translate() string … … 119 135 } 120 136 121 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 ) ); 149 } 150 151 /** 122 152 * Retrieve translated string with vertical bar context 123 153 * 124 154 * Quite a few times, there will be collisions with similar translatable text … … 145 175 return translate_with_gettext_context( $single, $context, $domain ); 146 176 } 147 177 178 function _xa( $single, $context, $domain = 'default' ) { 179 return attr( translate_with_gettext_context( $single, $context, $domain ) ); 180 } 181 148 182 function __ngettext() { 149 183 _deprecated_function( __FUNCTION__, '2.8', '_n()' ); 150 184 $args = func_get_args(); -
wp-includes/formatting.php
2073 2073 /** 2074 2074 * Escaping for HTML attributes. 2075 2075 * 2076 * @since 2. 0.62076 * @since 2.8.0 2077 2077 * 2078 2078 * @param string $text 2079 2079 * @return string 2080 2080 */ 2081 function attr ibute_escape( $text ) {2081 function attr( $text ) { 2082 2082 $safe_text = wp_check_invalid_utf8( $text ); 2083 2083 $safe_text = wp_specialchars( $safe_text, ENT_QUOTES ); 2084 2084 return apply_filters( 'attribute_escape', $safe_text, $text ); 2085 2085 } 2086 2086 2087 2087 /** 2088 * Escaping for HTML attributes. 2089 * 2090 * @since 2.0.6 2091 * 2092 * @deprecated 2.8.0 2093 * @see attr() 2094 * 2095 * @param string $text 2096 * @return string 2097 */ 2098 function attribute_escape( $text ) { 2099 return attr( $text ); 2100 } 2101 2102 /** 2088 2103 * Escape a HTML tag name. 2089 2104 * 2090 2105 * @since 2.5.0 -
wp-admin/categories.php
144 144 <p class="search-box"> 145 145 <label class="hidden" for="category-search-input"><?php _e('Search Categories'); ?>:</label> 146 146 <input type="text" id="category-search-input" name="s" value="<?php _admin_search_query(); ?>" /> 147 <input type="submit" value="<?php _e ( 'Search Categories' ); ?>" class="button" />147 <input type="submit" value="<?php _ea( 'Search Categories' ); ?>" class="button" /> 148 148 </p> 149 149 </form> 150 150 <br class="clear" /> … … 184 184 <option value="" selected="selected"><?php _e('Bulk Actions'); ?></option> 185 185 <option value="delete"><?php _e('Delete'); ?></option> 186 186 </select> 187 <input type="submit" value="<?php _e ('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" />187 <input type="submit" value="<?php _ea('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" /> 188 188 <?php wp_nonce_field('bulk-categories'); ?> 189 189 </div> 190 190 … … 224 224 <option value="" selected="selected"><?php _e('Bulk Actions'); ?></option> 225 225 <option value="delete"><?php _e('Delete'); ?></option> 226 226 </select> 227 <input type="submit" value="<?php _e ('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />227 <input type="submit" value="<?php _ea('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 228 228 <?php wp_nonce_field('bulk-categories'); ?> 229 229 </div> 230 230 … … 278 278 <p><?php _e('The description is not prominent by default, however some themes may show it.'); ?></p> 279 279 </div> 280 280 281 <p class="submit"><input type="submit" class="button" name="submit" value="<?php _e ('Add Category'); ?>" /></p>281 <p class="submit"><input type="submit" class="button" name="submit" value="<?php _ea('Add Category'); ?>" /></p> 282 282 <?php do_action('edit_category_form', $category); ?> 283 283 </form></div> 284 284