Skip to:
Content

bbPress.org

Changeset 4535


Ignore:
Timestamp:
11/29/2012 07:54:11 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Theme Compat:

  • Remove is_main_query() usage in bbp_replace_the_content().
  • Fixes some themes misbehaving with theme-compat, causing it not to work as intended.
  • For 2.2 branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/includes/core/theme-compat.php

    r4411 r4535  
    648648 * exist in the currently active theme.
    649649 *
     650 * Note that we do *not* currently use is_main_query() here. This is because so
     651 * many existing themes either use query_posts() or fail to use wp_reset_query()
     652 * when running queries before the main loop, causing theme compat to fail.
     653 *
    650654 * @since bbPress (r3034)
    651655 * @param string $content
     
    654658function bbp_replace_the_content( $content = '' ) {
    655659
    656     // Bail if not inside the main query loop
    657     if ( ! in_the_loop() || ! is_main_query() )
     660    // Bail if not inside the query loop
     661    if ( ! in_the_loop() )
    658662        return $content;
    659663
Note: See TracChangeset for help on using the changeset viewer.