WordPress.org

Making WordPress.org

Changeset 3236


Ignore:
Timestamp:
05/24/2016 09:05:21 PM (6 years ago)
Author:
coffee2code
Message:

Handbook plugin: Don't modify handbook archive query when handling search.

Allows for handbook-only searches.

See #515, #1671.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/handbook.php

    r3234 r3236  
    210210
    211211    function pre_get_posts( $query ) {
    212         if ( $query->is_main_query() && ! $query->is_admin && $query->is_post_type_archive( $this->post_type ) ) {
     212        if ( $query->is_main_query() && ! $query->is_admin && ! $query->is_search && $query->is_post_type_archive( $this->post_type ) ) {
    213213            // If the post type has a page to act as an archive index page, get that.
    214214            if ( $page = get_page_by_path( $this->post_type, OBJECT, $this->post_type ) ) {
Note: See TracChangeset for help on using the changeset viewer.