WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/17/2010 04:33:16 PM (9 years ago)
Author:
nacin
Message:

Make get_the_taxonomies() take an array of arguments. props scribu, fixes #14740.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r17009 r17028  
    28902890    extract( $r, EXTR_SKIP );
    28912891
    2892     echo $before . join($sep, get_the_taxonomies($post, $template)) . $after;
     2892    echo $before . join($sep, get_the_taxonomies($post, $r)) . $after;
    28932893}
    28942894
     
    29022902 *
    29032903 * @param int $post Optional. Post ID or will use Global Post ID (in loop).
    2904  * @param string $template Optional. The template to use for displaying the taxonomy terms.
     2904 * @param array $args Override the defaults.
    29052905 * @return array
    29062906 */
    2907 function get_the_taxonomies($post = 0, $template = '%s: %l.') {
     2907function get_the_taxonomies($post = 0, $args = array() ) {
    29082908    if ( is_int($post) )
    29092909        $post =& get_post($post);
    29102910    elseif ( !is_object($post) )
    29112911        $post =& $GLOBALS['post'];
     2912
     2913    $args = wp_parse_args( $args, array(
     2914        'template' => '%s: %l.',
     2915    ) );   
     2916    extract( $args, EXTR_SKIP );
    29122917
    29132918    $taxonomies = array();
Note: See TracChangeset for help on using the changeset viewer.