Make WordPress Core


Ignore:
Timestamp:
09/04/2009 08:47:36 AM (16 years ago)
Author:
markjaquith
Message:

Add a the_terms filter, and use a default ", " sep. props scribu. fixes #10600

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r11894 r11900  
    926926 * @return null|bool False on WordPress error. Returns null when displaying.
    927927 */
    928 function the_terms( $id, $taxonomy, $before = '', $sep = '', $after = '' ) {
    929     $return = get_the_term_list( $id, $taxonomy, $before, $sep, $after );
    930     if ( is_wp_error( $return ) )
     928function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) {
     929    $term_list = get_the_term_list( $id, $taxonomy, $before, $sep, $after );
     930
     931    if ( is_wp_error( $term_list ) )
    931932        return false;
    932     else
    933         echo $return;
     933
     934    echo apply_filters('the_terms', $term_list, $taxonomy, $before, $sep, $after);
    934935}
    935936
Note: See TracChangeset for help on using the changeset viewer.