Skip to content

Commit

Permalink
Permitindo busca de mais de um termo
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelo2605 committed Jun 13, 2016
1 parent 8cc9d11 commit a374feb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/class-mexp-resource-space-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ public function request( array $request ) {
// Ensure that 'page' is never 0. This breaks things.
$request['page'] = ( $request['page'] < 1 ) ? 1 : $request['page'];

// Get search term
$search_term = sanitize_text_field( $request['params']['q'] );
$search_term = str_replace(' ', '%20', $search_term);

// Build the request URL.
$api_url = add_query_arg(
apply_filters( 'resourcespace_request_args', array(
'search' => sanitize_text_field( $request['params']['q'] ),
'search' => $search_term,
'key' => PJ_RESOURCE_SPACE_KEY,
'previewsize' => 'pre',
'prettyfieldnames' => true,
Expand Down

0 comments on commit a374feb

Please sign in to comment.