Skip to:
Content

bbPress.org

Changeset 5470


Ignore:
Timestamp:
09/08/2014 04:51:39 PM (12 years ago)
Author:
johnjamesjacoby
Message:

In bbp_theme_compat_reset_post() also set is_singular to value of is_single. Improves query compatibility with themes and other plugins. Props Mat Lipe. Fixes #2545.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/theme-compat.php

    r5466 r5470  
    391391        $wp_query->is_tax     = $dummy['is_tax'];
    392392
     393        // Reset is_singular based on page/single args
     394        // https://bbpress.trac.wordpress.org/ticket/2545
     395        $wp_query->is_singular = $wp_query->is_single;
     396
    393397        // Clean up the dummy post
    394398        unset( $dummy );
     
    480484                        'post_title'     => bbp_get_displayed_user_field( 'display_name' ),
    481485                        'post_status'    => bbp_get_public_status_id(),
     486                        'is_single'      => true,
    482487                        'is_archive'     => false,
    483488                        'comment_status' => 'closed'
Note: See TracChangeset for help on using the changeset viewer.