SLP_Admin_Locations
extends WP_List_Table
in package
Store Locator Plus manage locations admin user interface.
Table of Contents
Properties
- $active_columns : mixed
- $addingLocation : mixed
- $baseAdminURL : mixed
- $cleanAdminURl : string
- $columns : mixed
- $current_action : mixed
- $hangoverURL : mixed
- $settings : mixed
- $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.
- create_settings_section_New() : void
- Add the temporary React-powered "New" subtab.
- 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.
- save_screen_options() : string
- 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
mixed
$active_columns
$addingLocation
public
mixed
$addingLocation
= \false
$baseAdminURL
public
mixed
$baseAdminURL
= ''
$cleanAdminURl read-only
public
string
$cleanAdminURl
$columns
public
mixed
$columns
= array()
$current_action
public
mixed
$current_action
$hangoverURL
public
mixed
$hangoverURL
= ''
$settings
public
mixed
$settings
$buttons
private
mixed
$buttons
$cleanAdminURL
private
mixed
$cleanAdminURL
= ''
$cleanURL
private
mixed
$cleanURL
$db_orderbyfield
private
mixed
$db_orderbyfield
= 'sl_store'
$empty_columns
private
mixed
$empty_columns
= array()
$extra_location_filters
private
mixed
$extra_location_filters
= ''
$screen_id
private
mixed
$screen_id
$script_data
private
mixed
$script_data
= array('locations' => array(), 'notices' => array())
$searchingFor
private
mixed
$searchingFor
= ''
$searchingForSomething
private
mixed
$searchingForSomething
= \false
$slplus
private
mixed
$slplus
$sort_order
private
mixed
$sort_order
= 'asc'
$start
private
mixed
$start
= 0
$total_locations_shown
private
mixed
$total_locations_shown
= 0
$wp_screen
private
mixed
$wp_screen
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(mixed $class) : string
Parameters
- $class : mixed
-
the current class string for the manage locations location entry.
Return values
string —the modified CSS class with private attached if warranted.
add_screen_options()
Add screen options.
public
add_screen_options() : mixed
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.
create_settings_section_New()
Add the temporary React-powered "New" subtab.
public
create_settings_section_New() : void
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
Return values
stringdisplay()
Output the manage locations admin page.
public
display() : mixed
display_manage_locations_table()
Build the content of the manage locations table.
public
display_manage_locations_table() : mixed
Tags
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
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_Objectmanage_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
save_screen_options()
Save screen options.
public
save_screen_options(mixed $status, string $option, string $value) : string
Parameters
- $status : mixed
- $option : string
-
name of option
- $value : string
-
value of option
Return values
stringset_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
stringset_location_order()
Set the locations table order by SQL command.
public
set_location_order(mixed $current_order_array) : mixed
Parameters
- $current_order_array : mixed
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
stringcreate_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
create_string_coordinate_link()
Add the lat/long under the store name.
private
create_string_coordinate_link(string $field_value) : string
Parameters
- $field_value : string
Return values
stringcreate_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
stringcreate_string_location_table_end()
Close out location table.
private
create_string_location_table_end() : string
Return values
stringcreate_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
stringcreatestring_PanelManageTablePagination()
Create the pagination string for the manage locations table.
private
createstring_PanelManageTablePagination(string $location_slug) : string
Parameters
- $location_slug : string
Return values
stringcreatestring_PanelManageTableTopActions()
Build the HTML for the top-of-table navigation interface.
private
createstring_PanelManageTableTopActions() : string
Return values
stringcreatestring_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)
enqueue_scripts()
Enqueue the dataTables JS.
private
enqueue_scripts() : mixed
Tags
get_screen_option_per_page()
Get the screen option per_page.
private
get_screen_option_per_page() : int
Return values
intset_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
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
stringset_urls()
Set our URL properties.
private
set_urls() : mixed
setup_action_buttons()
Setup the action buttons.
private
setup_action_buttons() : mixed