Tag descriptions, props aaroncampbell, fixes #9381

git-svn-id: https://develop.svn.wordpress.org/trunk@10903 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-04-09 16:00:40 +00:00
parent 5ac1f0112b
commit 10aaa00f62
5 changed files with 49 additions and 5 deletions
+3
View File
@@ -1169,6 +1169,9 @@ case 'inline-save-tax':
else
$taxonomy = 'post_tag';
$tag = get_term( $id, $taxonomy );
$_POST['description'] = $tag->description;
$updated = wp_update_term($id, $taxonomy, $_POST);
if ( $updated && !is_wp_error($updated) ) {
$tag = get_term( $updated['term_id'], $taxonomy );
+5
View File
@@ -34,6 +34,11 @@ do_action('edit_tag_form_pre', $tag); ?>
<td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
<p><?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>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="description"><?php _e('Description') ?></label></th>
<td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($tag->description); ?></textarea><br />
<?php _e('The description is not prominent by default, however some themes may show it.'); ?></td>
</tr>
</table>
<p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php _e('Update Tag'); ?>" /></p>
<?php do_action('edit_tag_form', $tag); ?>
+6
View File
@@ -287,6 +287,12 @@ else
<p><?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>
</div>
<div class="form-field">
<label for="description"><?php _e('Description') ?></label>
<textarea name="description" id="description" rows="5" cols="40"></textarea>
<p><?php _e('The description is not prominent by default, however some themes may show it.'); ?></p>
</div>
<p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Add Tag'); ?>" /></p>
<?php do_action('add_tag_form'); ?>
</form></div>
+4
View File
@@ -668,6 +668,9 @@ function _tag_row( $tag, $class = '', $taxonomy = 'post_tag' ) {
$out .= '<div class="name">' . $qe_data->name . '</div>';
$out .= '<div class="slug">' . $qe_data->slug . '</div></div></td>';
break;
case 'description':
$out .= "<td $attributes>$tag->description</td>";
break;
case 'slug':
$out .= "<td $attributes>$tag->slug</td>";
break;
@@ -872,6 +875,7 @@ function get_column_headers($page) {
$_wp_column_headers[$page] = array(
'cb' => '<input type="checkbox" />',
'name' => __('Name'),
'description' => __('Description'),
'slug' => __('Slug'),
'posts' => __('Posts')
);