From 1a5475f224c09e46bb2467daae6b5cceb46f1952 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 21 Feb 2010 02:55:07 +0000 Subject: [PATCH] add show_tagcloud to Taxonomy registration & add basic PHPDoc, See #11612 git-svn-id: http://svn.automattic.com/wordpress/trunk@13277 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index bd0cc6704..57c77752b 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -187,6 +187,15 @@ function is_taxonomy_hierarchical($taxonomy) { * query_var - false to prevent queries, or string to customize query var * (?$query_var=$term); default will use $taxonomy as query var. * + * public - If the taxonomy should be publically queryable; //@TODO not implemented. + * defaults to true. + * + * show_ui - If the WordPress UI admin tags UI should apply to this taxonomy; + * defaults to public. + * + * show_tagcloud - false to prevent the taxonomy being listed in the Tag Cloud Widget; + * defaults to show_ui which defalts to public. + * * @package WordPress * @subpackage Taxonomy * @since 2.3.0 @@ -211,6 +220,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) { 'public' => true, 'show_ui' => null, 'label' => null, + 'show_tagcloud' => null, '_builtin' => false ); $args = wp_parse_args($args, $defaults); @@ -236,6 +246,9 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) { if ( is_null($args['show_ui']) ) $args['show_ui'] = $args['public']; + if ( is_null($args['show_tagcloud']) ) + $args['show_tagcloud'] = $args['show_ui']; + if ( is_null($args['label'] ) ) $args['label'] = $taxonomy;