Making WordPress.org

Changeset 7441


Ignore:
Timestamp:
07/12/2018 06:36:54 PM (7 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Prevent unintended override of 'is_handbook_root' property.

Fixes #3708.

File:
1 edited

Legend:

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

    r7345 r7441  
    331331
    332332    function pre_get_posts( $query ) {
     333        // Bail early if query is not for this handbook's post type.
     334        if ( get_query_var( 'post_type' ) !== $this->post_type ) {
     335            // Request is obviously not for a handbook root page. (Though if the request is
     336            // for some other handbook's root page will be determined by that handbook.)
     337            if ( empty( get_query_var( 'handbook' ) ) ) {
     338                $query->is_handbook_root = false;
     339            }
     340            return;
     341        }
     342
    333343        $query->is_handbook_root = false;
    334344
Note: See TracChangeset for help on using the changeset viewer.