Changeset 36109 for branches/4.4
- Timestamp:
- 12/27/2015 04:42:35 PM (9 years ago)
- Location:
- branches/4.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
-
branches/4.4/src/wp-includes/taxonomy.php
r36057 r36109 391 391 $args['query_var'] = sanitize_title_with_dashes( $args['query_var'] ); 392 392 $wp->add_query_var( $args['query_var'] ); 393 } else { 394 // Force query_var to false for non-public taxonomies. 395 $args['query_var'] = false; 393 396 } 394 397 -
branches/4.4/tests/phpunit/tests/taxonomy.php
r35333 r36109 518 518 $this->assertFalse( is_tax( 'wptests_tax' ) ); 519 519 } 520 521 /** 522 * @ticket 35089 523 */ 524 public function test_query_var_should_be_forced_to_false_for_non_public_taxonomy() { 525 register_taxonomy( 'wptests_tax', 'post', array( 526 'public' => false, 527 'query_var' => true, 528 ) ); 529 530 $tax = get_taxonomy( 'wptests_tax' ); 531 $this->assertFalse( $tax->query_var ); 532 } 520 533 }
Note: See TracChangeset
for help on using the changeset viewer.