Changeset 11027
- Timestamp:
- 06/11/2021 05:56:31 AM (3 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content
- Files:
-
- 2 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' ) ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/searchform.php
r11026 r11027 24 24 $placeholder = _x( 'Search this forum', 'placeholder', 'wporg-forums' ); 25 25 $project = wporg_support_get_compat_object(); 26 $tab = $project->type; 27 $project = $project->post_name; 26 if ( $project ) { 27 $tab = $project->type; 28 $project = $project->post_name; 29 } else { 30 // Specific forum. 31 $tab = 'searchforum'; 32 $project = bbp_get_forum_id(); 33 } 28 34 } elseif ( is_front_page() ) { 29 35 $placeholder = _x( 'Search documentation', 'placeholder', 'wporg-forums' );
Note: See TracChangeset
for help on using the changeset viewer.