Changeset 34247 for trunk/src/wp-includes/class-wp.php
- Timestamp:
- 09/16/2015 07:04:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp.php
r34215 r34247 300 300 if ( $t->query_var && isset( $this->query_vars[$t->query_var] ) ) 301 301 $this->query_vars[$t->query_var] = str_replace( ' ', '+', $this->query_vars[$t->query_var] ); 302 303 // Don't allow non-public taxonomies to be queried from the front-end. 304 if ( ! is_admin() ) { 305 foreach ( get_taxonomies( array( 'public' => false ), 'objects' ) as $taxonomy => $t ) { 306 // Check first for taxonomy-specific query_var. 307 if ( $t->query_var && isset( $this->query_vars[ $t->query_var ] ) ) { 308 unset( $this->query_vars[ $t->query_var ] ); 309 } 310 311 // Next, check the 'taxonomy' query_var. 312 if ( isset( $this->query_vars['taxonomy'] ) && $taxonomy === $this->query_vars['taxonomy'] ) { 313 unset( $this->query_vars['taxonomy'], $this->query_vars['term'] ); 314 } 315 } 316 } 302 317 303 318 // Limit publicly queried post_types to those that are publicly_queryable
Note: See TracChangeset
for help on using the changeset viewer.