Changeset 15190
- Timestamp:
- 06/10/2010 04:07:33 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r15183 r15190 251 251 $tax_name = esc_attr($taxonomy); 252 252 $taxonomy = get_taxonomy($taxonomy); 253 254 $helps = isset( $taxonomy->helps ) ? esc_attr( $taxonomy->helps ) : esc_attr__('Separate tags with commas.');255 $help_nojs = isset( $taxonomy->help_nojs ) ? $taxonomy->help_nojs : __('Add or remove tags');256 $help_cloud = isset( $taxonomy->help_cloud ) ? $taxonomy->help_cloud : __('Choose from the most used tags');257 258 253 $disabled = !current_user_can($taxonomy->cap->assign_terms) ? 'disabled="disabled"' : ''; 259 254 ?> … … 261 256 <div class="jaxtag"> 262 257 <div class="nojs-tags hide-if-js"> 263 <p><?php echo $ help_nojs; ?></p>258 <p><?php echo $taxonomy->labels->add_or_remove_items; ?></p> 264 259 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php echo $disabled; ?>><?php echo esc_attr(get_terms_to_edit( $post->ID, $tax_name )); ?></textarea></div> 265 260 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?> … … 270 265 <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" tabindex="3" /></p> 271 266 </div> 272 <p class="howto"><?php echo $helps; ?></p>267 <p class="howto"><?php echo esc_attr( $taxonomy->labels->separate_items_with_commas ); ?></p> 273 268 <?php endif; ?> 274 269 </div> … … 276 271 </div> 277 272 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?> 278 <p class="hide-if-no-js"><a href="#titlediv" class="tagcloud-link" id="link-<?php echo $tax_name; ?>"><?php echo $ help_cloud; ?></a></p>273 <p class="hide-if-no-js"><a href="#titlediv" class="tagcloud-link" id="link-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->choose_from_most_used; ?></a></p> 279 274 <?php else : ?> 280 275 <p><em><?php _e('You cannot modify this taxonomy.'); ?></em></p> -
trunk/wp-includes/post.php
r15188 r15190 967 967 function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) { 968 968 969 if ( isset( $object->label ) ) {969 if ( isset( $object->label ) && empty( $object->labels['name'] ) ) 970 970 $object->labels['name'] = $object->label; 971 } 972 973 if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) { 971 972 if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) 974 973 $object->labels['singular_name'] = $object->labels['name']; 975 }976 974 977 975 $defaults = array_map( create_function( '$x', $object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults ); -
trunk/wp-includes/taxonomy.php
r15142 r15190 335 335 * - add_new_item - Default is Add New Tag/Add New Category 336 336 * - new_item_name - Default is New Tag Name/New Category Name 337 * - separate_items_with_commas - This string isn't used on hierarchical taxonomies. Default is "Separate tags with commas," used in the meta box. 338 * - add_or_remove_items - This string isn't used on hierarchical taxonomies. Default is "Add or remove tags," used in the meta box when JavaScript is disabled. 339 * - choose_from_most_used - This string isn't used on hierarchical taxonomies. Default is "Choose from the most used tags," used in the meta box. 337 340 * 338 341 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories.) … … 344 347 345 348 function get_taxonomy_labels( $tax ) { 349 if ( isset( $tax->helps ) && empty( $tax->labels['separate_items_with_commas'] ) ) 350 $tax->labels['separate_items_with_commas'] = $tax->helps; 351 346 352 $nohier_vs_hier_defaults = array( 347 353 'name' => array( _x( 'Post Tags', 'taxonomy general name' ), _x( 'Categories', 'taxonomy general name' ) ), … … 356 362 'add_new_item' => array( __( 'Add New Tag' ), __( 'Add New Category' ) ), 357 363 'new_item_name' => array( __( 'New Tag Name' ), __( 'New Category Name' ) ), 364 'separate_items_with_commas' => array( __( 'Separate tags with commas' ), null ), 365 'add_or_remove_items' => array( __( 'Add or remove tags' ), null ), 366 'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ), 358 367 ); 359 368
Note: See TracChangeset
for help on using the changeset viewer.