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 : bool
- $baseAdminURL : mixed
- $cleanAdminURl : string
- $columns : mixed
- $current_action : mixed
- $hangoverURL : mixed
- $settings : SLP_Settings
- $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
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.
- create_settings_section_Import() : mixed
- 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.
- display_manage_locations_table() : void
- Build the content of the manage locations table.
- 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.
- get_search_string() : string
- Get the current manage locations search string.
- get_total_locations_shown() : int
- Get the current manage locations result count.
- has_location_where_clause() : bool
- True when the current locations query includes a where clause.
- manage_columns() : array<string|int, mixed>
- Set up our screen columns.
- 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() : string
- Create the location details box.
- create_object_settings() : void
- 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 the location table.
- create_string_location_table_start() : string
- Start a location table.
- 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.
- display_column_headers() : void
- Create the column headers string.
- enqueue_scripts() : mixed
- Enqueue the location management scripts and CSS.
- get_screen_option_per_page() : int
- Get the screen option per_page.
- set_CurrentAction() : void
- 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
bool
$addingLocation
Adding a location? (default: 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
SLP_Settings
$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('all_displayed' => \true, '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
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
create_settings_section_Import()
Import panel only if Power not active.
public
create_settings_section_Import() : 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() : void
display_manage_locations_table()
Build the content of the manage locations table.
public
display_manage_locations_table() : void
Tags
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_Objectget_search_string()
Get the current manage locations search string.
public
get_search_string() : string
Return values
stringget_total_locations_shown()
Get the current manage locations result count.
public
get_total_locations_shown() : int
Return values
inthas_location_where_clause()
True when the current locations query includes a where clause.
public
has_location_where_clause() : bool
Return values
boolmanage_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
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
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() : string
Return values
stringcreate_object_settings()
Create and attach settings.
private
create_object_settings() : void
Tags
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 the location table.
private
create_string_location_table_end() : string
Return values
stringcreate_string_location_table_start()
Start a location table.
private
create_string_location_table_start() : string
Return values
stringcreatestring_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
stringdisplay_column_headers()
Create the column headers string.
private
display_column_headers() : void
enqueue_scripts()
Enqueue the location management scripts and CSS.
private
enqueue_scripts() : mixed
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() : void
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