Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/29/2012 07:52:28 PM (13 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.
  • /me shakes fist at query_posts().
File:
1 edited

Legend:

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

    r4522 r4534  
    650650 * exist in the currently active theme.
    651651 *
     652 * Note that we do *not* currently use is_main_query() here. This is because so
     653 * many existing themes either use query_posts() or fail to use wp_reset_query()
     654 * when running queries before the main loop, causing theme compat to fail.
     655 *
    652656 * @since bbPress (r3034)
    653657 * @param string $content
     
    656660function bbp_replace_the_content( $content = '' ) {
    657661
    658     // Bail if not inside the main query loop
    659     if ( ! in_the_loop() || ! is_main_query() )
     662    // Bail if not inside the query loop
     663    if ( ! in_the_loop() )
    660664        return $content;
    661665
Note: See TracChangeset for help on using the changeset viewer.