SLP_Settings_manage_locations_table
extends SLP_Setting
in package
Responsible for managing and displaying the locations table in the settings interface.
Table of Contents
Properties
- $addon : object
- $allowed_tags : array<string|int, object>
- $custom : mixed
- $data_field : mixed
- $description : mixed
- $disabled : mixed
- $display_value : mixed
- $id : mixed
- $label : mixed
- $myslp : MySLP
- $name : mixed
- $onChange : mixed
- $placeholder : mixed
- $related_to : mixed
- $show_label : mixed
- $slplus : SLPlus
- $type : mixed
- $uses_myslp : bool
- $uses_slplus : bool
- $value : mixed
- $vue : mixed
- $wrapper : mixed
- $attributes : mixed
- $classes : mixed
- $content : mixed
- $data : mixed
- $slug : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- display() : void
- Render the setting using the content from your override get_content().
- extend_vars_for_react() : array<string|int, mixed>
- Add locations table variables to the React bootstrap data.
- filter_safe_style_css_for_admin() : array<string|int, mixed>
- Allow all inline CSS on the admin tabs.
- filter_wp_kses_allowed_admin_tags() : mixed
- Tell KSES these tags are allowed on our admin settings pages so wpcs does not freak out.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- render_description() : mixed
- Render the description if needed.
- set_properties() : void
- Set our properties.
- at_startup() : mixed
- Override this in your class to do things at startup after we are initialized. Optional.
- get_attribute_string() : string
- Create the HTML attribute string by joining the attributes array.
- get_classes_string() : string
- Create the HTML classes string by joining the classes array.
- get_content() : string
- Get the content to be displayed. Override to generate the custom content for your setting.
- get_data_string() : string
- Create the HTML data string by joining the data array.
- initialize() : mixed
- Initialize.
- render_label() : mixed
- Render the label if needed.
- set_display_value() : mixed
- Set the display value
- wrap_in_default_html() : mixed
- Wrap our HTML in default divs.
- get_bulk_actions_for_react() : array<string|int, mixed>
- Build the bulk action list for the React locations table header.
- get_current_filter_action() : string
- Get the current active manage locations filter action.
- get_filter_values_for_react() : array<string|int, mixed>
- Get active filter field values for the React location filter drawer.
- get_filters_for_react() : array<string|int, mixed>
- Build the location filters list for the React locations table header.
- get_search_for_react() : string
- Get the current search string for the React locations table header.
- locations_are_available() : bool
- True when the current table query has locations available for row actions.
- locations_exist() : bool
- True when locations exist in the database, even if the current filter has no matches.
- normalize_bulk_action_for_react() : array<string|int, mixed>
- Normalize legacy PHP dropdown metadata into a React-friendly action record.
- normalize_filter_for_react() : array<string|int, mixed>
- Normalize legacy PHP dropdown metadata into a React-friendly filter record.
- sanitize_filter_value_list() : array<string|int, string>
- Sanitize a scalar or array list of submitted filter values.
Properties
$addon
public
object
$addon
$allowed_tags
public
array<string|int, object>
$allowed_tags
= array()
$custom
public
mixed
$custom
$data_field
public
mixed
$data_field
$description
public
mixed
$description
$disabled
public
mixed
$disabled
= \false
$display_value
public
mixed
$display_value
$id
public
mixed
$id
$label
public
mixed
$label
$myslp
public
MySLP
$myslp
$name
public
mixed
$name
$onChange
public
mixed
$onChange
= ''
$placeholder
public
mixed
$placeholder
= ''
$related_to
public
mixed
$related_to
= ''
$show_label
public
mixed
$show_label
= \true
$slplus
public
SLPlus
$slplus
$type
public
mixed
$type
= 'custom'
$uses_myslp
public
bool
$uses_myslp
Set to true to add a $myslp property pointing to global $myslp
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$value
public
mixed
$value
$vue
public
mixed
$vue
= \false
$wrapper
public
mixed
$wrapper
= \true
$attributes
protected
mixed
$attributes
= array()
$classes
protected
mixed
$classes
= array()
$content
protected
mixed
$content
= ''
$data
protected
mixed
$data
= array()
$slug
protected
mixed
$slug
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
public
__get(string $property) : SLPlus_BaseClass_Object
Parameters
- $property : string
Return values
SLPlus_BaseClass_Object__isset()
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
booldisplay()
Render the setting using the content from your override get_content().
public
display() : void
Only override this if you do not want the standard HTML wrapper.
extend_vars_for_react()
Add locations table variables to the React bootstrap data.
public
extend_vars_for_react(array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
- $vars : array<string|int, mixed>
-
React variables.
Return values
array<string|int, mixed>filter_safe_style_css_for_admin()
Allow all inline CSS on the admin tabs.
public
filter_safe_style_css_for_admin(mixed $safe_css_array) : array<string|int, mixed>
Parameters
- $safe_css_array : mixed
Return values
array<string|int, mixed>filter_wp_kses_allowed_admin_tags()
Tell KSES these tags are allowed on our admin settings pages so wpcs does not freak out.
public
filter_wp_kses_allowed_admin_tags(mixed $allowed_tags) : mixed
It does not look like there is a valid esc* or kses* method that allows echo $var when $var contains valid admin-page tags like or
Parameters
- $allowed_tags : mixed
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() ]) : static
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
staticrender_description()
Render the description if needed.
public
render_description() : mixed
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : void
Parameters
- $options : array<string|int, mixed> = array()
at_startup()
Override this in your class to do things at startup after we are initialized. Optional.
protected
at_startup() : mixed
get_attribute_string()
Create the HTML attribute string by joining the attributes array.
protected
get_attribute_string() : string
Return values
stringget_classes_string()
Create the HTML classes string by joining the classes array.
protected
get_classes_string([mixed $classes_array = null ]) : string
Parameters
- $classes_array : mixed = null
Return values
stringget_content()
Get the content to be displayed. Override to generate the custom content for your setting.
protected
get_content(string $data, string $attributes) : string
Parameters
- $data : string
-
The data-* attributes
- $attributes : string
-
All other attributes.
Return values
stringget_data_string()
Create the HTML data string by joining the data array.
protected
get_data_string([mixed $data_array = null ]) : string
Parameters
- $data_array : mixed = null
Return values
stringinitialize()
Initialize.
protected
initialize() : mixed
render_label()
Render the label if needed.
protected
render_label() : mixed
set_display_value()
Set the display value
protected
set_display_value() : mixed
wrap_in_default_html()
Wrap our HTML in default divs.
protected
wrap_in_default_html() : mixed
get_bulk_actions_for_react()
Build the bulk action list for the React locations table header.
private
get_bulk_actions_for_react() : array<string|int, mixed>
Return values
array<string|int, mixed>get_current_filter_action()
Get the current active manage locations filter action.
private
get_current_filter_action() : string
Return values
stringget_filter_values_for_react()
Get active filter field values for the React location filter drawer.
private
get_filter_values_for_react() : array<string|int, mixed>
Return values
array<string|int, mixed>get_filters_for_react()
Build the location filters list for the React locations table header.
private
get_filters_for_react() : array<string|int, mixed>
Return values
array<string|int, mixed>get_search_for_react()
Get the current search string for the React locations table header.
private
get_search_for_react() : string
Return values
stringlocations_are_available()
True when the current table query has locations available for row actions.
private
locations_are_available() : bool
Return values
boollocations_exist()
True when locations exist in the database, even if the current filter has no matches.
private
locations_exist() : bool
Return values
boolnormalize_bulk_action_for_react()
Normalize legacy PHP dropdown metadata into a React-friendly action record.
private
normalize_bulk_action_for_react(array<string|int, mixed> $action) : array<string|int, mixed>
Parameters
- $action : array<string|int, mixed>
-
Legacy bulk action item.
Return values
array<string|int, mixed>normalize_filter_for_react()
Normalize legacy PHP dropdown metadata into a React-friendly filter record.
private
normalize_filter_for_react(array<string|int, mixed> $filter[, string $current_filter = '' ]) : array<string|int, mixed>
Parameters
- $filter : array<string|int, mixed>
-
Legacy filter item.
- $current_filter : string = ''
Return values
array<string|int, mixed>sanitize_filter_value_list()
Sanitize a scalar or array list of submitted filter values.
private
sanitize_filter_value_list(mixed $values) : array<string|int, string>
Parameters
- $values : mixed
-
Submitted values.