Constants

MILES_PER_KILOMETER

MILES_PER_KILOMETER

Properties

$url_path

$url_path : 

Plugin URL path.

Type

$results

$results : 

Type

$result

$result : 

Type

$current_result

$current_result : 

Type

$result_count

$result_count : 

Type

$query_vars

$query_vars : 

Type

$near_location

$near_location : 

Type

$units

$units : 

Type

$max_km

$max_km : 

Type

$distance_factor

$distance_factor : 

Type

Methods

__construct()

__construct(string|array $query)

Constructor.

Sets up the query if included.

Parameters

string|array $query

Search parameters.

query()

query(string|array $args) : array

Run a search query.

Parameters

string|array $args

Search parameters.

Returns

array —

Search results.

load_template()

load_template(string $template) : string

WordPress filter to add geo mashup search results to page content when requested.

Parameters

string $template

Returns

string —

Content including search results if requested.

have_posts()

have_posts() : boolean

Whether there are more results to loop through.

Returns

boolean —

True if there are more results, otherwise false.

get_the_IDs()

get_the_IDs() : array

Get an array of the post IDs found.

Returns

array —

Post IDs.

get_the_ID_list()

get_the_ID_list() : string

Get a comma separated list of the post IDs found.

Returns

string —

ID list.

get_userdata()

get_userdata() : array|null

Get a comma separated list of the post IDs found.

Returns

array|null —

User data if found.

the_post()

the_post()

Set up the the current post to use in the results loop.

the_distance()

the_distance(string|array $args) : null|string

Display or retrieve the distance from the search point to the current result.

Parameters

string|array $args

Tag arguments

Returns

null|string —

Null on failure or display, string if echo is false.

enqueue_script()

enqueue_script(string $handle)

Add a script to modify form behavior.

Parameters

string $handle

Handle the script was registered with