Changeset 13332 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-search.php
- Timestamp:
- 03/14/2024 03:26:56 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-search.php
r13190 r13332 183 183 // These are the things that jetpack_search_es_wp_query_args doesn't let us change, so we need to filter the es_query_args late in the code path to add more custom stuff. 184 184 185 $es_query_args['filter']['and'] ??= []; 186 185 187 // Exclude disabled plugins. 186 $es_query_args[ 'filter' ] = [ 187 'and' => [ 188 0 => [ 189 'term' => [ 190 'disabled' => [ 188 $es_query_args['filter']['and'][] = [ 189 'term' => [ 190 'disabled' => [ 191 191 'value' => false, 192 ], 193 ], 194 ], 192 ], 195 193 ] 196 194 ]; … … 207 205 } 208 206 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' )214 ]215 ]216 ];217 }218 219 207 // Set boost on the match query 220 208 … … 232 220 unset( $es_query_args[ 'query' ][ 'function_score' ][ 'query' ][ 'bool' ][ 'should' ][0][ 'multi_match' ][ 'operator' ] ); 233 221 } 234 235 222 236 223 // Some extra fields here
Note: See TracChangeset
for help on using the changeset viewer.