Store Locator Plus®

SLP_Admin_Locations extends WP_List_Table

Store Locator Plus manage locations admin user interface.

Table of Contents

Properties

$active_columns  : array<string|int, mixed>
$active_columns  : mixed
$addingLocation  : bool
$addingLocation  : mixed
$baseAdminURL  : string
$baseAdminURL  : mixed
$buttons  : array<string|int, mixed>
$cleanAdminURl  : string
$cleanURL  : string
$columns  : array<string|int, mixed>
$columns  : mixed
$current_action  : string
$current_action  : mixed
$db_orderbyfield  : string
$empty_columns  : array<string|int, mixed>
$extra_location_filters  : string
$hangoverURL  : string
$hangoverURL  : mixed
$script_data  : array<string|int, mixed>
$settings  : SLP_Settings
$settings  : mixed
$slplus  : SLPlus
$sort_order  : string
$start  : int
$total_locations_shown  : int
$buttons  : mixed
$cleanAdminURL  : mixed
$cleanURL  : mixed
$db_orderbyfield  : mixed
$empty_columns  : mixed
$extra_location_filters  : mixed
$screen_id  : mixed
$script_data  : mixed
$searchingFor  : mixed
$searchingForSomething  : mixed
$slplus  : mixed
$sort_order  : mixed
$start  : mixed
$total_locations_shown  : mixed
$wp_screen  : 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()  : mixed
Add a notification for JavaScript.
add_private_location_css()  : string
Add the private class to locations marked private.
add_screen_options()  : mixed
Add screen options.
create_settings_section_Add()  : mixed
Returns the string that is the Location Info Form guts.
create_settings_section_Import()  : mixed
Import panel only if Power not active.
create_settings_section_Manage()  : mixed
Attach the HTML for the manage locations panel to the settings object as a new section.
createstring_BulkActionsBlock()  : mixed
Create the bulk actions drop down for the top-of-table navigation.
customize_location_list_displayed_data()  : string
Customize the data displayed to the user in the location list.
display()  : mixed
Output the manage locations admin page.
display_manage_locations_table()  : mixed
Build the content of the manage locations table.
filter_active_columns()  : mixed
Filter the active columns.
filter_InvalidHighlight()  : string
Set the invalid highlighting class.
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.
manage_columns()  : array<string|int, mixed>
Set up our screen columns.
processCurrentScreen()  : void
On WP hook 'current_screen', go do this.
save_screen_options()  : mixed
Save screen options.
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 table order by SQL command.
create_action_buttons_html()  : string
Build the action buttons HTML string on the first column of the manage locations panel.
create_location_details_box()  : mixed
Create the location details box.
create_object_settings()  : mixed
Create and attach settings.
create_string_coordinate_link()  : string
Add the lat/long under the store name.
create_string_image_html()  : string
Create an HTML image.
create_string_location_table_end()  : string
Close out location table.
create_string_location_table_start()  : mixed
Start location table.
createstring_FiltersBlock()  : mixed
Create the filters drop down for the top-of-table navigation.
createstring_PaginationBlock()  : string
Create the manage locations pagination block
createstring_PanelManageTablePagination()  : string
Create the pagination string for the manage locations table.
createstring_PanelManageTableTopActions()  : string
Build the HTML for the top-of-table navigation interface.
createstring_SearchBlock()  : mixed
Create the display drop down for the top-of-table navigation.
display_column_headers()  : mixed
Create the column headers string.
enqueue_scripts()  : mixed
Enqueue the dataTables JS.
get_screen_option_per_page()  : int
Get the screen option per_page.
set_CurrentAction()  : mixed
Set the current action being executed by the plugin.
set_location_query()  : mixed
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()  : mixed
Set our URL properties.
setup_action_buttons()  : mixed
Setup the action buttons.

Properties

$active_columns

public array<string|int, mixed> $active_columns

Active extended data columns. metatable['records'][] from the SLPlus_Data_Extension class

$buttons read-only

public array<string|int, mixed> $buttons

The action buttons array.

$cleanURL read-only

public string $cleanURL

The current request URL without order by or sorting parameters.

$columns

public array<string|int, mixed> $columns

The Manage Locations interface column names. key is the field name, value is the column title

$current_action

public string $current_action

The current action as determined by the incoming $_REQUEST['act'] string.

$db_orderbyfield read-only

public string $db_orderbyfield

Order by field for the order by clause.

$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

$extra_location_filters read-only

public string $extra_location_filters

Extra database where clause filters. This is leftover from legacy code where this admin ui locations class had its own custom data handler for managing where clauses and order by vs. the current data class standard sql methods.

$hangoverURL

public string $hangoverURL

The manage locations URL with params we like to keep such as page number and sort order.

$script_data read-only

public array<string|int, mixed> $script_data

Things to be localized for the data tables js.

$total_locations_shown read-only

public int $total_locations_shown

Total locations on list.

$script_data

private mixed $script_data = array('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) : mixed
Parameters
$message : string

add_private_location_css()

Add the private class to locations marked private.

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

the current class string for the manage locations location entry.

Return values
string

the modified CSS class with private attached if warranted.

create_settings_section_Add()

Returns the string that is the Location Info Form guts.

public create_settings_section_Add() : mixed

create_settings_section_Import()

Import panel only if Power not active.

public create_settings_section_Import() : mixed

create_settings_section_Manage()

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

public create_settings_section_Manage() : mixed

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

createstring_BulkActionsBlock()

Create the bulk actions drop down for the top-of-table navigation.

public createstring_BulkActionsBlock() : mixed

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
used-by

create_string_manage_locations_table

trigger

slp_column_data

Return values
string

display_manage_locations_table()

Build the content of the manage locations table.

public display_manage_locations_table() : mixed
Tags
uses
SLP_Admin_Locations::add_private_location_css

via SLP Filter slp_locations_manage_cssclass

uses
SLP_Admin_Locations::filter_InvalidHighlight

via SLP Filter slp_locations_manage_cssclass

filter

slp_locations_manage_cssclass Filter to add manage locations css classes

filter-params

string current CSS classnames

filter-return

string modified CSS classnames

filter_active_columns()

Filter the active columns.

public filter_active_columns() : mixed

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

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

manage_columns()

Set up our screen columns.

public manage_columns(array<string|int, mixed> $columns) : array<string|int, mixed>

Impacts screen options column list.

Parameters
$columns : array<string|int, mixed>

the existing columns

Return values
array<string|int, mixed>

key = field slug, value = title

processCurrentScreen()

On WP hook 'current_screen', go do this.

public processCurrentScreen( $screen) : void

..

Parameters
$screen :

save_screen_options()

Save screen options.

public save_screen_options( $status, string $option, string $value) : mixed
Parameters
$status :
$option : string

name of option

$value : string

value of option

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( $where) : string
Parameters
$where :
Return values
string

set_location_order()

Set the locations table order by SQL command.

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

create_action_buttons_html()

Build the action buttons HTML string on the first column of the manage locations panel.

private create_action_buttons_html() : string
Return values
string

create_location_details_box()

Create the location details box.

private create_location_details_box() : mixed

create_object_settings()

Create and attach settings.

private create_object_settings() : mixed

Add the lat/long under the store name.

private create_string_coordinate_link(string $field_value) : string
Parameters
$field_value : string
Return values
string

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_location_table_end()

Close out location table.

private create_string_location_table_end() : string
Return values
string

create_string_location_table_start()

Start location table.

private create_string_location_table_start() : mixed

createstring_FiltersBlock()

Create the filters drop down for the top-of-table navigation.

private createstring_FiltersBlock() : mixed

createstring_PaginationBlock()

Create the manage locations pagination block

private createstring_PaginationBlock([int $totalLocations = 0 ][, int $num_per_page = 10 ][, int $start = 0 ][, string $location_slug = '' ]) : string
Parameters
$totalLocations : int = 0
$num_per_page : int = 10
$start : int = 0
$location_slug : string = ''
Return values
string

createstring_PanelManageTablePagination()

Create the pagination string for the manage locations table.

private createstring_PanelManageTablePagination(string $location_slug) : string
Parameters
$location_slug : string
Return values
string

createstring_PanelManageTableTopActions()

Build the HTML for the top-of-table navigation interface.

private createstring_PanelManageTableTopActions() : string
Return values
string

createstring_SearchBlock()

Create the display drop down for the top-of-table navigation.

private createstring_SearchBlock() : mixed

display_column_headers()

Create the column headers string.

private display_column_headers([bool $with_id = true ]) : mixed
Parameters
$with_id : bool = true

Show ID on column header. (default: true)

get_screen_option_per_page()

Get the screen option per_page.

private get_screen_option_per_page() : int
Return values
int

set_CurrentAction()

Set the current action being executed by the plugin.

private set_CurrentAction() : mixed

set_location_query()

Set all the properties that manage the location query.

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

via SLP Filter slp_orderby_default

uses
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() : mixed

        
On this page

Search results