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:
parent
34a04942e9
commit
1a5475f224
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue