diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php
index 387cbd3534..4fdfc00d63 100644
--- a/wp-admin/admin-ajax.php
+++ b/wp-admin/admin-ajax.php
@@ -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 );
diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php
index 8cd22f8ef5..74861f342d 100644
--- a/wp-admin/edit-tag-form.php
+++ b/wp-admin/edit-tag-form.php
@@ -34,6 +34,11 @@ do_action('edit_tag_form_pre', $tag); ?>
|
+
+ |
+
+ |
+
diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php
index a6d13e2537..89e1a161d1 100644
--- a/wp-admin/edit-tags.php
+++ b/wp-admin/edit-tags.php
@@ -287,6 +287,12 @@ else
+
+
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index c2d60441cd..28bfe9bb72 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -668,6 +668,9 @@ function _tag_row( $tag, $class = '', $taxonomy = 'post_tag' ) {
$out .= '' . $qe_data->name . '
';
$out .= '' . $qe_data->slug . '
';
break;
+ case 'description':
+ $out .= "$tag->description | ";
+ break;
case 'slug':
$out .= "$tag->slug | ";
break;
@@ -872,6 +875,7 @@ function get_column_headers($page) {
$_wp_column_headers[$page] = array(
'cb' => '',
'name' => __('Name'),
+ 'description' => __('Description'),
'slug' => __('Slug'),
'posts' => __('Posts')
);
diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php
index f83f213c38..b178dee091 100644
--- a/wp-includes/category-template.php
+++ b/wp-includes/category-template.php
@@ -293,11 +293,7 @@ function the_category( $separator = '', $parents='', $post_id = false ) {
* @return string Category description, available.
*/
function category_description( $category = 0 ) {
- global $cat;
- if ( !$category )
- $category = $cat;
-
- return get_term_field( 'description', $category, 'category' );
+ return term_description( $category, 'category' );
}
/**
@@ -798,6 +794,36 @@ function the_tags( $before = null, $sep = ', ', $after = '' ) {
echo get_the_tag_list($before, $sep, $after);
}
+/**
+ * Retrieve tag description.
+ *
+ * @since 2.8
+ *
+ * @param int $tag Optional. Tag ID. Will use global tag ID by default.
+ * @return string Tag description, available.
+ */
+function tag_description( $tag = 0 ) {
+ return term_description( $tag );
+}
+
+/**
+ * Retrieve term description.
+ *
+ * @since 2.8
+ *
+ * @param int $term Optional. Term ID. Will use global term ID by default.
+ * @return string Term description, available.
+ */
+function term_description( $term = 0, $taxonomy = 'post_tag' ) {
+ if ( !$term && ( is_tax() || is_tag() || is_category() ) ) {
+ global $wp_query;
+ $term = $wp_query->get_queried_object();
+ $taxonomy = $term->taxonomy;
+ $term = $term->term_id;
+ }
+ return get_term_field( 'description', $term, $taxonomy );
+}
+
/**
* Retrieve the terms of the taxonomy that are attached to the post.
*