';
@@ -652,7 +652,7 @@ function _tag_row( $tag, $class = '' ) {
* @param unknown_type $searchterms
* @return unknown
*/
-function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
+function tag_rows( $page = 1, $pagesize = 20, $searchterms = '', $taxonomy = 'post_tag' ) {
// Get a page worth of tags
$start = ($page - 1) * $pagesize;
@@ -663,13 +663,13 @@ function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
$args['search'] = $searchterms;
}
- $tags = get_terms( 'post_tag', $args );
+ $tags = get_terms( $taxonomy, $args );
// convert it to table rows
$out = '';
$count = 0;
foreach( $tags as $tag )
- $out .= _tag_row( $tag, ++$count % 2 ? ' class="iedit alternate"' : ' class="iedit"' );
+ $out .= _tag_row( $tag, ++$count % 2 ? ' class="iedit alternate"' : ' class="iedit"', $taxonomy );
// filter and send to screen
echo $out;
diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
index dcd1cad2c9..4409bb080a 100644
--- a/wp-includes/link-template.php
+++ b/wp-includes/link-template.php
@@ -569,13 +569,13 @@ function get_tag_feed_link($tag_id, $feed = '') {
* @param int $tag_id Tag ID
* @return string
*/
-function get_edit_tag_link( $tag_id = 0 ) {
+function get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) {
$tag = get_term($tag_id, 'post_tag');
if ( !current_user_can('manage_categories') )
return;
- $location = admin_url('edit-tags.php?action=edit&tag_ID=') . $tag->term_id;
+ $location = admin_url('edit-tags.php?action=edit&taxonomy=' . $taxonomy . '&tag_ID=' . $tag->term_id);
return apply_filters( 'get_edit_tag_link', $location );
}
@@ -1245,14 +1245,15 @@ function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
}
/**
- * Display link to next comments pages.
+ * Return the link to next comments pages.
*
- * @since 2.7.0
+ * @since 2.7.1
*
* @param string $label Optional. Label for link text.
* @param int $max_page Optional. Max page.
+ * @return string|null
*/
-function next_comments_link($label='', $max_page = 0) {
+function get_next_comments_link( $label = '', $max_page = 0 ) {
global $wp_query;
if ( !is_singular() )
@@ -1277,20 +1278,30 @@ function next_comments_link($label='', $max_page = 0) {
if ( empty($label) )
$label = __('Newer Comments »');
- echo '
". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
+ return '
'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
}
/**
- * Display the previous comments page link.
+ * Display the link to next comments pages.
*
* @since 2.7.0
*
- * @param string $label Optional. Label for comments link text.
+ * @param string $label Optional. Label for link text.
+ * @param int $max_page Optional. Max page.
*/
-function previous_comments_link($label='') {
+function next_comments_link( $label = '', $max_page = 0 ) {
+ echo get_next_comments_link( $label, $max_page );
+}
+/**
+ * Return the previous comments page link.
+ *
+ * @since 2.7.1
+ *
+ * @param string $label Optional. Label for comments link text.
+ * @return string|null
+ */
+function get_previous_comments_link( $label = '' ) {
if ( !is_singular() )
return;
@@ -1307,9 +1318,18 @@ function previous_comments_link($label='') {
if ( empty($label) )
$label = __('« Older Comments');
- echo '
". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
+ return '
' . preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
+}
+
+/**
+ * Display the previous comments page link.
+ *
+ * @since 2.7.0
+ *
+ * @param string $label Optional. Label for comments link text.
+ */
+function previous_comments_link( $label = '' ) {
+ echo get_previous_comments_link( $label );
}
/**