You are here

function search_api_location_input_raw in Search API Location 7.2

Returns the data exactly as entered.

Parameters

$input: The text entered by the user.

array $options: The options for this plugin (empty).

Return value

$input if it is a valid location string. NULL otherwise.

1 string reference to 'search_api_location_input_raw'
raw.inc in plugins/location_input/raw.inc
Plugin to provide raw location input.

File

plugins/location_input/raw.inc, line 29
Plugin to provide raw location input.

Code

function search_api_location_input_raw($input, array $options) {
  $input = trim($input);
  return preg_match('/^[+-]?[0-9]+(?:\\.[0-9]+)?,[+-]?[0-9]+(?:\\.[0-9]+)?$/', $input) ? $input : NULL;
}