Store Locator Plus®

MySLP_REST_API
in package

Class MySLP_REST_API

Table of Contents

Properties

$myslp_namespace  : mixed
$option_modifier  : mixed
$options  : mixed
$slplus  : mixed
$status  : mixed
$user  : mixed

Methods

__construct()  : mixed
Default things to do/load when running this plugin
add_hooks()  : mixed
Adding hooks
add_location()  : mixed
Add location
delete_location()  : mixed
Delete location
edit_location()  : mixed
Edit location
get_locations()  : mixed
Get all locations
get_locations_limit()  : WP_Error|WP_REST_ResponseAdd
Callback for locations-limit route
get_map_options()  : mixed
Get options, if api key is active
get_user_account_info()  : mixed
Get user account info
register_routes()  : mixed
Register necessary routes in here
search_map()  : mixed
Search map locations if api key is active
attach_core_scripts()  : string
Return the MySLP and Core JavaScript as a string.
catch_addon_scripts()  : array<string|int, mixed>
Get add on scripts.
catch_addon_styles()  : array<string|int, mixed>
check_activation()  : bool
Check if the api key is active
get_inline_style()  : string
get_layout_data()  : false|string
Get the DIV HTML for SLPLUS
get_map_locations()  : array<string|int, mixed>
Get map locations, with it map positions
get_options()  : StdClass
Get options
get_options_data()  : mixed|string|void
Set the options data in the SLP scripts.
get_search_locations()  : mixed
myslp_get_dep_scrips()  : array<string|int, mixed>
Get dependent scripts.
set_options()  : void
Set db prefix according to the user, who got api key, provided in request

Properties

Methods

__construct()

Default things to do/load when running this plugin

public __construct() : mixed

add_location()

Add location

public add_location(mixed $request) : mixed
Parameters
$request : mixed

delete_location()

Delete location

public delete_location(mixed $data) : mixed
Parameters
$data : mixed
Tags
since
1.0.0

edit_location()

Edit location

public edit_location(mixed $data) : mixed
Parameters
$data : mixed
Tags
since
1.0.0

get_locations()

Get all locations

public get_locations(WP_REST_Request $request) : mixed
Parameters
$request : WP_REST_Request

get_locations_limit()

Callback for locations-limit route

public get_locations_limit(WP_REST_Request $request) : WP_Error|WP_REST_ResponseAdd
Parameters
$request : WP_REST_Request
Tags
global

type $myslp_current_blog_settings

Return values
WP_Error|WP_REST_ResponseAdd

location with it limit

get_map_options()

Get options, if api key is active

public get_map_options(WP_REST_Request $request) : mixed
Parameters
$request : WP_REST_Request

search_map()

Search map locations if api key is active

public search_map(WP_REST_Request $request) : mixed
Parameters
$request : WP_REST_Request

attach_core_scripts()

Return the MySLP and Core JavaScript as a string.

private attach_core_scripts() : string
Return values
string

catch_addon_scripts()

Get add on scripts.

private catch_addon_scripts() : array<string|int, mixed>
Return values
array<string|int, mixed>

catch_addon_styles()

private catch_addon_styles() : array<string|int, mixed>
Return values
array<string|int, mixed>

check_activation()

Check if the api key is active

private check_activation(string $API_key) : bool
Parameters
$API_key : string

The api key

Return values
bool

True if the api key is active, else false

get_layout_data()

Get the DIV HTML for SLPLUS

private get_layout_data(array<string|int, mixed> $attributes) : false|string
Parameters
$attributes : array<string|int, mixed>
Return values
false|string

get_map_locations()

Get map locations, with it map positions

private get_map_locations(string $type[, array<string|int, mixed> $query = null ][, int $limit = null ]) : array<string|int, mixed>
Parameters
$type : string

load|search

$query : array<string|int, mixed> = null

The executable query params | null to get from default options

$limit : int = null

The limit of the locations to get | null to get initial_results_returned

Tags
used-by

get_options, get_search_locations

access

private

Return values
array<string|int, mixed>

Locations

get_options()

Get options

private get_options(mixed $attributes) : StdClass
Parameters
$attributes : mixed
Tags
used-by

get_map_options

Return values
StdClass

The all map options.

get_options_data()

Set the options data in the SLP scripts.

private get_options_data() : mixed|string|void
Return values
mixed|string|void

get_search_locations()

private get_search_locations(mixed $query) : mixed
Parameters
$query : mixed

myslp_get_dep_scrips()

Get dependent scripts.

private myslp_get_dep_scrips( $deps[, array<string|int, mixed> $return = array() ]) : array<string|int, mixed>
Parameters
$deps :
$return : array<string|int, mixed> = array()
Return values
array<string|int, mixed>

set_options()

Set db prefix according to the user, who got api key, provided in request

private set_options() : void

        
On this page

Search results