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
This commit is contained in:
dd32 2010-02-21 02:55:07 +00:00
parent 34a04942e9
commit 1a5475f224
1 changed files with 13 additions and 0 deletions

View File

@ -187,6 +187,15 @@ function is_taxonomy_hierarchical($taxonomy) {
* query_var - false to prevent queries, or string to customize query var * query_var - false to prevent queries, or string to customize query var
* (?$query_var=$term); default will use $taxonomy as 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 * @package WordPress
* @subpackage Taxonomy * @subpackage Taxonomy
* @since 2.3.0 * @since 2.3.0
@ -211,6 +220,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
'public' => true, 'public' => true,
'show_ui' => null, 'show_ui' => null,
'label' => null, 'label' => null,
'show_tagcloud' => null,
'_builtin' => false '_builtin' => false
); );
$args = wp_parse_args($args, $defaults); $args = wp_parse_args($args, $defaults);
@ -236,6 +246,9 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
if ( is_null($args['show_ui']) ) if ( is_null($args['show_ui']) )
$args['show_ui'] = $args['public']; $args['show_ui'] = $args['public'];
if ( is_null($args['show_tagcloud']) )
$args['show_tagcloud'] = $args['show_ui'];
if ( is_null($args['label'] ) ) if ( is_null($args['label'] ) )
$args['label'] = $taxonomy; $args['label'] = $taxonomy;