Changeset 13648
- Timestamp:
- 05/02/2024 06:08:26 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-search.php
r13642 r13648 217 217 // 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. 218 218 219 $es_query_args['filter']['and'] ??= []; 220 221 // Exclude disabled plugins. 222 $es_query_args['filter']['and'][] = [ 223 'term' => [ 224 'disabled' => [ 225 'value' => false, 226 ], 219 // Replace any existing filter with an AND for our custom filters. 220 $es_query_args['filter'] = [ 221 'and' => $es_query_args['filter'] ? [ $es_query_args['filter'] ] : [], 222 ]; 223 224 // Exclude 'disabled' plugins. This is separate from the 'status' field, which is used for the plugin status. 225 $es_query_args['filter']['and'] = [ 226 'terms' => [ 227 'disabled' => false, 227 228 ] 228 229 ]; 229 230 231 // Limit to the Block Directory. 230 232 if ( $this->is_block_search ) { 231 // Limit to the Block Tax.232 233 $es_query_args['filter']['and'][] = [ 233 'term' => [ 234 'taxonomy.plugin_section.name' => [ 235 'value' => 'block' 236 ] 234 'terms' => [ 235 'taxonomy.plugin_section.name' => 'block', 237 236 ] 238 237 ];
Note: See TracChangeset
for help on using the changeset viewer.