Make WordPress Core


Ignore:
Timestamp:
06/10/2010 04:07:33 PM (15 years ago)
Author:
nacin
Message:

Move 'helps' argument to the taxonomy labels object. Also move over help_nojs and help_cloud, both introduced in 3.0. This adds three new core labels for non-hierarchical taxonomies, for tweaking the meta box strings. fixes #13805.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r15183 r15190  
    251251    $tax_name = esc_attr($taxonomy);
    252252    $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 
    258253    $disabled = !current_user_can($taxonomy->cap->assign_terms) ? 'disabled="disabled"' : '';
    259254?>
     
    261256    <div class="jaxtag">
    262257    <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>
    264259    <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>
    265260    <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?>
     
    270265        <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" tabindex="3" /></p>
    271266    </div>
    272     <p class="howto"><?php echo $helps; ?></p>
     267    <p class="howto"><?php echo esc_attr( $taxonomy->labels->separate_items_with_commas ); ?></p>
    273268    <?php endif; ?>
    274269    </div>
     
    276271</div>
    277272<?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>
    279274<?php else : ?>
    280275<p><em><?php _e('You cannot modify this taxonomy.'); ?></em></p>
Note: See TracChangeset for help on using the changeset viewer.