Changeset 11027 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-performance-optimizations.php
- Timestamp:
- 06/11/2021 05:56:31 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-performance-optimizations.php
r11025 r11027 94 94 95 95 $tab = $_GET['tab'] ?? 'support'; 96 if ( ! in_array( $tab, [ 'support', 'docs', 'plugin', 'theme' ] ) ) {96 if ( ! in_array( $tab, [ 'support', 'docs', 'plugin', 'theme', 'searchforum' ] ) ) { 97 97 $tab = 'support'; 98 98 } … … 101 101 case 'theme': 102 102 case 'plugin': 103 case 'searchforum': 103 104 wp_safe_redirect( add_query_arg( $tab, $_GET[ $tab ], home_url( "/search/{$search_terms}/" ) ) ); 104 105 exit; … … 151 152 ] 152 153 ] ); 154 155 add_filter( 'posts_where', array( $this, 'posts_in_last_year' ) ); 156 } elseif ( ! empty( $_GET['searchforum'] ) ) { 157 $query->set( 'post_parent', (int) $_GET['searchforum'] ); 153 158 154 159 add_filter( 'posts_where', array( $this, 'posts_in_last_year' ) );
Note: See TracChangeset
for help on using the changeset viewer.