Make WordPress Core


Ignore:
Timestamp:
11/15/2021 04:43:29 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Clarify the taxonomy labels for customizing the field descriptions on Edit Tags screen:

  • Update the label names to make it clear that these descriptions are not for the term name or slug itself, but for the Name, Slug, Parent, and Description fields:
    • name_field_description
    • slug_field_description
    • parent_field_description
    • desc_field_description
  • Update the array structure to make it clear that the default values for these labels are the same for both hierarchical and non-hierarchical taxonomies, with the exception of parent_field_description.
  • Add documentation and a @since note for the new labels.

Follow-up to [52094].

Fixes #43060.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r52094 r52163  
    455455    <label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label>
    456456    <input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
    457     <p><?php echo $tax->labels->name_description; ?></p>
     457    <p><?php echo $tax->labels->name_field_description; ?></p>
    458458</div>
    459459    <?php if ( ! global_terms_enabled() ) : ?>
     
    461461    <label for="tag-slug"><?php _e( 'Slug' ); ?></label>
    462462    <input name="slug" id="tag-slug" type="text" value="" size="40" />
    463     <p><?php echo $tax->labels->slug_description; ?></p>
     463    <p><?php echo $tax->labels->slug_field_description; ?></p>
    464464</div>
    465465<?php endif; // global_terms_enabled() ?>
     
    506506        <p><?php _e( 'Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.' ); ?></p>
    507507    <?php else : ?>
    508         <p><?php echo $tax->labels->parent_description; ?></p>
     508        <p><?php echo $tax->labels->parent_field_description; ?></p>
    509509    <?php endif; ?>
    510510</div>
     
    513513    <label for="tag-description"><?php _e( 'Description' ); ?></label>
    514514    <textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
    515     <p><?php echo $tax->labels->description_description; ?></p>
     515    <p><?php echo $tax->labels->desc_field_description; ?></p>
    516516</div>
    517517
Note: See TracChangeset for help on using the changeset viewer.