WordPress.org

Make WordPress Core

Ticket #18513: 18513.patch

File 18513.patch, 754 bytes (added by SergeyBiryukov, 4 years ago)
  • wp-includes/class-wp.php

     
    284284                                $this->query_vars[$t->query_var] = str_replace( ' ', '+', $this->query_vars[$t->query_var] ); 
    285285 
    286286                // Limit publicly queried post_types to those that are publicly_queryable 
    287                 if ( isset( $this->query_vars['post_type']) ) { 
     287                if ( isset( $this->query_vars['post_type'] ) && ! isset( $this->query_vars['s'] ) ) { 
    288288                        $queryable_post_types = get_post_types( array('publicly_queryable' => true) ); 
    289289                        if ( ! is_array( $this->query_vars['post_type'] ) ) { 
    290290                                if ( ! in_array( $this->query_vars['post_type'], $queryable_post_types ) )