Changeset 9051
- Timestamp:
- 07/17/2019 07:14:19 AM (5 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-query-plugins.php
r6287 r9051 60 60 } 61 61 62 // Temporary hacky block search 63 if ( $request->get_param( 'block' ) ) { 64 global $wpdb; 65 $block_search = $request->get_param( 'block' ); 66 $meta_query = array( 67 'relation' => 'OR', 68 array( 69 'key' => 'block_name', 70 'value' => '^' . $block_search, 71 'compare' => 'RLIKE', 72 ), 73 array( 74 'key' => 'block_name', 75 'value' => '/' . $block_search, // search following the slash 76 'compare' => 'RLIKE', 77 ), 78 ); 79 80 // Limit the search to the Block section 81 $query[ 'meta_query' ] = $meta_query; 82 $query[ 'tax_query' ] = array( 83 array( 84 'taxonomy' => 'plugin_section', 85 'field' => 'slug', 86 'terms' => 'block', 87 ) 88 ); 89 } 90 62 91 if ( ! $query ) { 63 92 return $response; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-request.php
r6496 r9051 216 216 $query['author_name'] = $this->args->author; 217 217 } 218 219 // Block 220 if ( ! empty( $this->args->block ) ) { 221 $query['block'] = $this->args->block; 222 } 218 223 } 219 224
Note: See TracChangeset
for help on using the changeset viewer.