SLPĀ® phpDocs

SLP_Admin_Locations extends WP_List_Table

Store Locator Plus manage locations admin user interface.

Table of Contents

Properties

$active_columns  : mixed
$addingLocation  : bool
$baseAdminURL  : mixed
$cleanAdminURl  : string
$cleanURL  : string
$columns  : mixed
$current_action  : mixed
$empty_columns  : array<string|int, mixed>
$hangoverURL  : mixed
$settings  : SLP_Settings
$buttons  : mixed
$cleanAdminURL  : mixed
$db_orderbyfield  : mixed
$extra_location_filters  : mixed
$rest_grid_filter_logic  : string
$rest_grid_filters  : array<string|int, mixed>
$rest_grid_quick_filter_fields  : array<string|int, mixed>
$rest_grid_quick_filter_logic  : string
$rest_grid_quick_filter_values  : array<string|int, mixed>
$rest_request  : bool
$script_data  : mixed
$searchingFor  : mixed
$searchingForSomething  : mixed
$slplus  : mixed
$sort_order  : mixed
$start  : mixed
$total_locations_shown  : mixed

Methods

__construct()  : mixed
SLP_Admin_Locations constructor.
add_extended_data_to_active_columns()  : array<string|int, mixed>
Adds the extended data columns.
add_notice()  : void
Add a notification for JavaScript.
add_private_location_css()  : string
Add the private class to locations marked private.
addListLocationsSetting()  : mixed
Attach the HTML for the manage locations panel to the settings object as a new section.
addLocationAddForm()  : void
Returns the string that is the Location Info Form guts.
addLocationCardsSetting()  : void
Attach the card-based locations view as a section beside the locations list.
configure_for_rest()  : void
Configure this screen object from an authenticated REST management request.
create_settings_section_Import()  : void
Import panel only if Power not active.
customize_location_list_displayed_data()  : string
Customize the data displayed to the user in the location list.
display()  : void
Output the manage locations admin page.
filter_InvalidHighlight()  : string
Set the invalid highlighting class.
filter_rest_grid_where()  : string
Apply the MUI column and quick-filter models to validated location fields.
get_column_info()  : array<string|int, mixed>
Get a list of all, hidden and sortable columns, with filter applied
get_columns()  : mixed
Set the columns we will render on the manage locations page.
get_instance()  : SLPlus_BaseClass_Object
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
get_locations_for_rest()  : array<string|int, mixed>
Return structured rows and column metadata for the React locations grid.
set_active_columns()  : mixed
Get the extended columns meta data and remember them within this class.
set_location_filter()  : string
Add the location filter.
set_location_order()  : mixed
Set the locations query order by SQL command.
create_object_settings()  : void
Create and attach settings.
create_string_image_html()  : string
Create an HTML image.
create_string_locations_grid_start()  : string
Start the locations grid panel.
enqueue_scripts()  : void
Enqueue the location management scripts and CSS.
get_actions_for_rest()  : array<string|int, mixed>
Return structured row actions after module filters run.
get_rest_grid_filter_clause()  : string
Convert a validated DataGrid filter to a SQL clause.
is_rest_query_field()  : bool
Return true when a column maps to a real base or extended-data field.
set_CurrentAction()  : void
Set the current action being executed by the plugin.
set_location_query()  : void
Set all the properties that manage the location query.
set_search_filter()  : string
Set the search filter (where clause) if the searchfor field comes in via the form post.
set_urls()  : void
Set our URL properties.
setup_action_buttons()  : void
Setup the action buttons.

Properties

$cleanURL read-only

public string $cleanURL

The current request URL without order by or sorting parameters.

$empty_columns read-only

public array<string|int, mixed> $empty_columns

A list of empty column field IDs. key is the field name, value is the column title

$rest_grid_quick_filter_fields

private array<string|int, mixed> $rest_grid_quick_filter_fields = array()

$rest_grid_quick_filter_values

private array<string|int, mixed> $rest_grid_quick_filter_values = array()

$script_data

private mixed $script_data = array('all_displayed' => \true, 'locations' => array(), 'notices' => array())

Methods

__construct()

SLP_Admin_Locations constructor.

public __construct([array<string|int, mixed> $args = array() ]) : mixed
Parameters
$args : array<string|int, mixed> = array()

add_extended_data_to_active_columns()

Adds the extended data columns.

public add_extended_data_to_active_columns(array<string|int, mixed> $current_cols) : array<string|int, mixed>
Parameters
$current_cols : array<string|int, mixed>

The current columns

Return values
array<string|int, mixed>

add_notice()

Add a notification for JavaScript.

public add_notice(string $message) : void
Parameters
$message : string

add_private_location_css()

Add the private class to locations marked private.

public add_private_location_css(string $class) : string
Parameters
$class : string

the current class string for the manage locations location entry.

Return values
string

the modified CSS class with private attached if warranted.

addListLocationsSetting()

Attach the HTML for the manage locations panel to the settings object as a new section.

public addListLocationsSetting() : mixed

This will be rendered via the render_adminpage method via the standard wpCSL Settings object display method.

addLocationAddForm()

Returns the string that is the Location Info Form guts.

public addLocationAddForm() : void

addLocationCardsSetting()

Attach the card-based locations view as a section beside the locations list.

public addLocationCardsSetting() : void

configure_for_rest()

Configure this screen object from an authenticated REST management request.

public configure_for_rest(array<string|int, mixed> $params) : void
Parameters
$params : array<string|int, mixed>

create_settings_section_Import()

Import panel only if Power not active.

public create_settings_section_Import() : void

customize_location_list_displayed_data()

Customize the data displayed to the user in the location list.

public customize_location_list_displayed_data(string $data, string $slug, string $label) : string
Parameters
$data : string
$slug : string
$label : string
Tags
trigger

slp_column_data

Return values
string

filter_InvalidHighlight()

Set the invalid highlighting class.

public filter_InvalidHighlight(string $class) : string
Parameters
$class : string
Return values
string

the new class name for invalid rows

filter_rest_grid_where()

Apply the MUI column and quick-filter models to validated location fields.

public filter_rest_grid_where(string $where) : string
Parameters
$where : string
Return values
string

get_column_info()

Get a list of all, hidden and sortable columns, with filter applied

public get_column_info() : array<string|int, mixed>
Return values
array<string|int, mixed>

get_columns()

Set the columns we will render on the manage locations page.

public get_columns() : mixed
Tags
uses
SLP_Admin_Locations::add_extended_data_to_active_columns

via SLP Filter slp_manage_location_columns

get_instance()

Return an instance of the object which is also registered to the slplus global less the SLP_ part.

public static get_instance([bool $no_global = false ][, mixed $params = array() ]) : SLPlus_BaseClass_Object
Parameters
$no_global : bool = false

set to true to skip assigning object to SLP global as a property.

$params : mixed = array()

object init params *

Return values
SLPlus_BaseClass_Object

get_locations_for_rest()

Return structured rows and column metadata for the React locations grid.

public get_locations_for_rest(int $per_page, int $page) : array<string|int, mixed>
Parameters
$per_page : int
$page : int
Tags
uses
SLP_Admin_Locations::get_locations_for_rest
Return values
array<string|int, mixed>

set_active_columns()

Get the extended columns meta data and remember them within this class.

public set_active_columns() : mixed

set_location_filter()

Add the location filter.

public set_location_filter(mixed $where) : string
Parameters
$where : mixed
Return values
string

set_location_order()

Set the locations query order by SQL command.

public set_location_order(mixed $current_order_array) : mixed
Parameters
$current_order_array : mixed

create_string_image_html()

Create an HTML image.

private create_string_image_html(string $image_source[, string $title = '' ]) : string
Parameters
$image_source : string

The image source.

$title : string = ''

The title for the image.

Return values
string

create_string_locations_grid_start()

Start the locations grid panel.

private create_string_locations_grid_start() : string
Return values
string

enqueue_scripts()

Enqueue the location management scripts and CSS.

private enqueue_scripts() : void

get_actions_for_rest()

Return structured row actions after module filters run.

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

get_rest_grid_filter_clause()

Convert a validated DataGrid filter to a SQL clause.

private get_rest_grid_filter_clause(array<string|int, mixed> $filter) : string
Parameters
$filter : array<string|int, mixed>
Return values
string

is_rest_query_field()

Return true when a column maps to a real base or extended-data field.

private is_rest_query_field(string $field) : bool
Parameters
$field : string
Return values
bool

set_CurrentAction()

Set the current action being executed by the plugin.

private set_CurrentAction() : void

set_location_query()

Set all the properties that manage the location query.

private set_location_query() : void
Tags
uses
SLP_Admin_Locations::set_location_order

via SLP Filter slp_orderby_default

SLP_Admin_Locations::set_location_filter

via SLP Filter slp_location_where

set_search_filter()

Set the search filter (where clause) if the searchfor field comes in via the form post.

private set_search_filter() : string
Return values
string

setup_action_buttons()

Setup the action buttons.

private setup_action_buttons() : void
On this page

Search results