Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/08/2014 03:05:19 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Only add the s argument to queries if rs or ts are set in their respective topics & replies queries.

See #2607, #WP11330, [WP28623] [WP28612], [WP28804].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/template.php

    r5466 r5467  
    125125
    126126        // Other defaults
    127         $default_reply_search   = !empty( $_REQUEST['rs'] ) ? $_REQUEST['rs']    : false;
    128127        $default_post_parent    = ( bbp_is_single_topic() ) ? bbp_get_topic_id() : 'any';
    129128        $default_post_type      = ( bbp_is_single_topic() && bbp_show_lead_topic() ) ? bbp_get_reply_post_type() : array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
     
    140139                'hierarchical'        => $default_thread_replies,    // Hierarchical replies
    141140                'ignore_sticky_posts' => true,                       // Stickies not supported
    142                 's'                   => $default_reply_search,      // Maybe search
    143141        );
     142
     143        // Only add 's' arg if searching for replies
     144        // See https://bbpress.trac.wordpress.org/ticket/2607
     145        if ( ! empty( $_REQUEST['rs'] ) ) {
     146                $default['s'] = $_REQUEST['rs'];
     147        }
    144148
    145149        // What are the default allowed statuses (based on user caps)
Note: See TracChangeset for help on using the changeset viewer.