-function the_tags( $before = 'Tags: ', $sep = ', ', $after = '' ) {
- return the_terms( 0, 'post_tag', $before, $sep, $after );
+function the_tags( $before = null, $sep = ', ', $after = '' ) {
+ if ( null === $before )
+ $before = __('Tags: ');
+ 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 );