Changeset 36525 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 02/13/2016 03:50:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r36516 r36525 289 289 * Default empty array. 290 290 * @type string $description A short descriptive summary of what the taxonomy is for. Default empty. 291 * @type bool $public Whether the taxonomy is publicly queryable. Default true. 291 * @type bool $public Whether a taxonomy is intended for use publicly either via 292 * the admin interface or by front-end users. The default settings 293 * of `$publicly_queryable`, `$show_ui`, and `$show_in_nav_menus` 294 * are inherited from `$public`. 295 * @type bool $publicly_queryable Whether the taxonomy is publicly queryable. 296 * If not set, the default is inherited from `$public` 292 297 * @type bool $hierarchical Whether the taxonomy is hierarchical. Default false. 293 298 * @type bool $show_ui Whether to generate and allow a UI for managing terms in this taxonomy in … … 363 368 'description' => '', 364 369 'public' => true, 370 'publicly_queryable' => null, 365 371 'hierarchical' => false, 366 372 'show_ui' => null, … … 384 390 } 385 391 386 // Non-public taxonomies should not register query vars, except in the admin. 387 if ( false !== $args['query_var'] && ( is_admin() || false !== $args['public'] ) && ! empty( $wp ) ) { 392 // If not set, default to the setting for public. 393 if ( null === $args['publicly_queryable'] ) { 394 $args['publicly_queryable'] = $args['public']; 395 } 396 397 // Non-publicly queryable taxonomies should not register query vars, except in the admin. 398 if ( false !== $args['query_var'] && ( is_admin() || false !== $args['publicly_queryable'] ) && ! empty( $wp ) ) { 388 399 if ( true === $args['query_var'] ) 389 400 $args['query_var'] = $taxonomy;
Note: See TracChangeset
for help on using the changeset viewer.