Skip to:
Content

Ignore:
Timestamp:
02/13/15 18:35:50 (3 years ago)
Author:
r-a-y
Message:

Theme compat: Streamline toggling of $wp_query properties during theme compatibility.

on BuddyPress pages by toggling the $wp_query is_single and is_page
properties to false during theme compatibility and back to true after
the loop.

However, if we're on a regular WordPress page, only the is_page property
returns true. Therefore, this commit removes the is_single overrides,
which fixes issues with the comments template rendering in some themes
like Atahualpa.

Fixes #6153.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-theme-compatibility.php

    r9390 r9484  
    849849    global $wp_query; 
    850850 
    851     $wp_query->is_single = false; 
    852     $wp_query->is_page   = false; 
     851    $wp_query->is_page = false; 
    853852 
    854853    // Set a switch so we know that we've toggled these WP_Query properties 
     
    878877 
    879878    // Revert our toggled WP_Query properties 
    880     $query->is_single = true; 
    881     $query->is_page   = true; 
     879    $query->is_page = true; 
    882880 
    883881    // Unset our switch 
Note: See TracChangeset for help on using the changeset viewer.