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
This commit is contained in:
nacin 2010-12-17 16:33:16 +00:00
parent 01c718f85f
commit 300bee4a8d
1 changed files with 8 additions and 3 deletions

View File

@ -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 )