Changeset 13190
- Timestamp:
- 02/08/2024 04:40:01 AM (13 months 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/plugin-directory/class-plugin-search.php
r12942 r13190 202 202 'taxonomy.plugin_section.name' => [ 203 203 'value' => 'block' 204 ] 205 ] 206 ]; 207 } 208 209 if ( $query->get( 'plugin_business_model' ) ) { 210 $es_query_args['filter']['and'][] = [ 211 'term' => [ 212 'taxonomy.plugin_business_model.name' => [ 213 'value' => $query->get( 'plugin_business_model' ) 204 214 ] 205 215 ] -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php
r12825 r13190 30 30 $is_favs = 'favorites' === $wp_query->get( 'browse' ); 31 31 // The filter bar should not be shown on: 32 // - search: wp-query filters not compatible with ES search.33 32 // - singular: not relevant on pages or individual plugins. 34 33 // - beta: likely unnecessary, these are probably all "community". 35 34 // - favorites: not necessary. 36 $show_filter_bar = ! ( is_s earch() || is_singular() || $is_beta || $is_favs );35 $show_filter_bar = ! ( is_singular() || $is_beta || $is_favs ); 37 36 38 37 echo do_blocks( '<!-- wp:wporg/global-header /-->' ); // phpcs:ignore … … 87 86 if ( 88 87 // URL contains this filter. 89 ( $slug && str_contains( $_SERVER['REQUEST_URI'], "plugin_business_model=$slug" ) ) || // phpcs:ignore88 ( $slug === ( $_GET['plugin_business_model'] ?? false ) ) || 90 89 // Set the All item active if no business model is selected. 91 ( ! $slug && false === strpos( $_SERVER['REQUEST_URI'], 'plugin_business_model' ) ) // phpcs:ignore90 ( ! $slug && empty( $_GET['plugin_business_model'] ) ) 92 91 ) { 93 92 $class = 'is-active'; 94 93 } 95 $url = home_url( '/' ); 96 // If a browse view, use that as the base. 97 if ( ! is_home() && $browse = get_query_var( 'browse' ) ) { 98 $url = home_url( "/browse/{$browse}/" ); 94 95 if ( $slug ) { 96 $url = add_query_arg( array( 'plugin_business_model' => $slug ) ); 97 } else { 98 $url = remove_query_arg( 'plugin_business_model' ); 99 99 } 100 if ( $slug ) { 101 $url = add_query_arg( array( 'plugin_business_model' => $slug ), $url ); 102 } 100 101 // Reset pagination. 102 $url = remove_query_arg( 'paged', $url ); 103 $url = preg_replace( '!/page/\d+/?!i', '/', $url ); 104 103 105 printf( 104 106 '<li class="page_item"><a class="%1$s" href="%2$s">%3$s</a></li>',
Note: See TracChangeset
for help on using the changeset viewer.