wp/wp-admin/edit-tag-form.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
   144 ?>
   144 ?>
   145 	<table class="form-table" role="presentation">
   145 	<table class="form-table" role="presentation">
   146 		<tr class="form-field form-required term-name-wrap">
   146 		<tr class="form-field form-required term-name-wrap">
   147 			<th scope="row"><label for="name"><?php _ex( 'Name', 'term name' ); ?></label></th>
   147 			<th scope="row"><label for="name"><?php _ex( 'Name', 'term name' ); ?></label></th>
   148 			<td><input name="name" id="name" type="text" value="<?php echo $tag_name_value; ?>" size="40" aria-required="true" />
   148 			<td><input name="name" id="name" type="text" value="<?php echo $tag_name_value; ?>" size="40" aria-required="true" />
   149 			<p class="description"><?php _e( 'The name is how it appears on your site.' ); ?></p></td>
   149 			<p class="description"><?php echo $tax->labels->name_field_description; ?></p></td>
   150 		</tr>
   150 		</tr>
   151 <?php if ( ! global_terms_enabled() ) { ?>
   151 <?php if ( ! global_terms_enabled() ) { ?>
   152 		<tr class="form-field term-slug-wrap">
   152 		<tr class="form-field term-slug-wrap">
   153 			<th scope="row"><label for="slug"><?php _e( 'Slug' ); ?></label></th>
   153 			<th scope="row"><label for="slug"><?php _e( 'Slug' ); ?></label></th>
   154 			<?php
   154 			<?php
   166 			 * @param WP_Term|WP_Post $tag  Term or post object.
   166 			 * @param WP_Term|WP_Post $tag  Term or post object.
   167 			 */
   167 			 */
   168 			$slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';
   168 			$slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';
   169 			?>
   169 			?>
   170 			<td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" />
   170 			<td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" />
   171 			<p class="description"><?php _e( 'The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ); ?></p></td>
   171 			<p class="description"><?php echo $tax->labels->slug_field_description; ?></p></td>
   172 		</tr>
   172 		</tr>
   173 <?php } ?>
   173 <?php } ?>
   174 <?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
   174 <?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
   175 		<tr class="form-field term-parent-wrap">
   175 		<tr class="form-field term-parent-wrap">
   176 			<th scope="row"><label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label></th>
   176 			<th scope="row"><label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label></th>
   193 				wp_dropdown_categories( $dropdown_args );
   193 				wp_dropdown_categories( $dropdown_args );
   194 				?>
   194 				?>
   195 				<?php if ( 'category' === $taxonomy ) : ?>
   195 				<?php if ( 'category' === $taxonomy ) : ?>
   196 					<p class="description"><?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>
   196 					<p class="description"><?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>
   197 				<?php else : ?>
   197 				<?php else : ?>
   198 					<p class="description"><?php _e( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' ); ?></p>
   198 					<p class="description"><?php echo $tax->labels->parent_field_description; ?></p>
   199 				<?php endif; ?>
   199 				<?php endif; ?>
   200 			</td>
   200 			</td>
   201 		</tr>
   201 		</tr>
   202 <?php endif; // is_taxonomy_hierarchical() ?>
   202 <?php endif; // is_taxonomy_hierarchical() ?>
   203 		<tr class="form-field term-description-wrap">
   203 		<tr class="form-field term-description-wrap">
   204 			<th scope="row"><label for="description"><?php _e( 'Description' ); ?></label></th>
   204 			<th scope="row"><label for="description"><?php _e( 'Description' ); ?></label></th>
   205 			<td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea>
   205 			<td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea>
   206 			<p class="description"><?php _e( 'The description is not prominent by default; however, some themes may show it.' ); ?></p></td>
   206 			<p class="description"><?php echo $tax->labels->desc_field_description; ?></p></td>
   207 		</tr>
   207 		</tr>
   208 		<?php
   208 		<?php
   209 		// Back compat hooks.
   209 		// Back compat hooks.
   210 		if ( 'category' === $taxonomy ) {
   210 		if ( 'category' === $taxonomy ) {
   211 			/**
   211 			/**