WordPress.org

Make WordPress Core

Changeset 10554


Ignore:
Timestamp:
02/11/2009 11:41:29 PM (11 years ago)
Author:
ryan
Message:

Add taxonomy argument to wp_tag_cloud()

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-tags.php

    r10348 r10554  
    245245<?php
    246246if ( $can_manage )
    247     wp_tag_cloud(array('link' => 'edit'));
     247    wp_tag_cloud(array('taxonomy' => $taxonomy, 'link' => 'edit'));
    248248else
    249     wp_tag_cloud();
     249    wp_tag_cloud(array('taxonomy' => $taxonomy));
    250250?>
    251251</div>
  • trunk/wp-includes/category-template.php

    r10316 r10554  
    561561        'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
    562562        'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
    563         'exclude' => '', 'include' => '', 'link' => 'view'
     563        'exclude' => '', 'include' => '', 'link' => 'view', 'taxonomy' => 'post_tag'
    564564    );
    565565    $args = wp_parse_args( $args, $defaults );
    566566
    567     $tags = get_tags( array_merge( $args, array( 'orderby' => 'count', 'order' => 'DESC' ) ) ); // Always query top tags
     567    $tags = get_terms( $args['taxonomy'], array_merge( $args, array( 'orderby' => 'count', 'order' => 'DESC' ) ) ); // Always query top tags
    568568
    569569    if ( empty( $tags ) )
     
    572572    foreach ( $tags as $key => $tag ) {
    573573        if ( 'edit' == $args['link'] )
    574             $link = get_edit_tag_link( $tag->term_id );
     574            $link = get_edit_tag_link( $tag->term_id, $args['taxonomy'] );
    575575        else
    576             $link = get_tag_link( $tag->term_id );
     576            $link = get_term_link( $tag->term_id, $args['taxonomy'] );
    577577        if ( is_wp_error( $link ) )
    578578            return false;
  • trunk/wp-includes/link-template.php

    r10525 r10554  
    576576 */
    577577function get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) {
    578     $tag = get_term($tag_id, 'post_tag');
     578    $tag = get_term($tag_id, $taxonomy);
    579579
    580580    if ( !current_user_can('manage_categories') )
Note: See TracChangeset for help on using the changeset viewer.