From 300bee4a8d75bb98201135f28d514b82b2e89e9c Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 17 Dec 2010 16:33:16 +0000 Subject: [PATCH] Make get_the_taxonomies() take an array of arguments. props scribu, fixes #14740. git-svn-id: http://svn.automattic.com/wordpress/trunk@17028 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 47cd90935..32f77e413 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2889,7 +2889,7 @@ function the_taxonomies($args = array()) { $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); - echo $before . join($sep, get_the_taxonomies($post, $template)) . $after; + echo $before . join($sep, get_the_taxonomies($post, $r)) . $after; } /** @@ -2901,15 +2901,20 @@ function the_taxonomies($args = array()) { * @since 2.5.0 * * @param int $post Optional. Post ID or will use Global Post ID (in loop). - * @param string $template Optional. The template to use for displaying the taxonomy terms. + * @param array $args Override the defaults. * @return array */ -function get_the_taxonomies($post = 0, $template = '%s: %l.') { +function get_the_taxonomies($post = 0, $args = array() ) { if ( is_int($post) ) $post =& get_post($post); elseif ( !is_object($post) ) $post =& $GLOBALS['post']; + $args = wp_parse_args( $args, array( + 'template' => '%s: %l.', + ) ); + extract( $args, EXTR_SKIP ); + $taxonomies = array(); if ( !$post )