SLP_Settings_file
extends SLP_Setting
in package
The file setting.
Table of Contents
Properties
- $allowed_tags : array<string|int, object>
- $button_text : mixed
- $custom : mixed
- $data_field : mixed
- $description : mixed
- $disabled : mixed
- $display_value : mixed
- $id : mixed
- $label : mixed
- $name : mixed
- $onChange : mixed
- $placeholder : mixed
- $related_to : mixed
- $show_label : mixed
- $slplus : SLPlus
- $type : mixed
- $uses_slplus : bool
- $value : mixed
- $vue : mixed
- $wrapper : mixed
- $attributes : mixed
- $classes : mixed
- $content : mixed
- $data : mixed
- $slplus : mixed
- $uses_slplus : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- display() : mixed
- Render the setting using the content from your override get_content().
- 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() : SLPlus_BaseClass_Object
- 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() : mixed
- 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
- The file HTML.
- get_data_string() : string
- Create the HTML data string by joining the data array.
- initialize() : mixed
- Do these things when this object is invoked. Override in your class.
- 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.
- add_base_classes() : mixed
- Add our base classes
- set_attributes() : mixed
- Set extra attributes.
- set_data() : mixed
- Set the data.
- set_disabled_attribute() : mixed
- Set disabled attribute
- set_id() : mixed
- Set the ID
- set_on_change_attribute() : mixed
- Set onChange attribute
- set_placeholder_attribute() : mixed
- Set placeholder attribute
- set_value() : mixed
- Set the value
Properties
$allowed_tags
public
array<string|int, object>
$allowed_tags
= array()
$button_text
public
mixed
$button_text
$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
$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_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()
$slplus
protected
mixed
$slplus
$uses_slplus
protected
mixed
$uses_slplus
= \true
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() : mixed
Only override this if you do not want the standard HTML wrapper.
filter_safe_style_css_for_admin()
Allow all inline CSS on the admin tabs.
public
filter_safe_style_css_for_admin( $safe_css_array) : array<string|int, mixed>
Parameters
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( $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
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
TODO: PHP7.4 and PHP8.0 the static instance variable returns an object matching $class TODO: PHP8.1 the static instance continually returns the FIRST object (SLP_Admin_Helper) every time -- it is like PHP8.1 static instance is bound to base_class-object versus the calling class 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_Objectrender_description()
Render the description if needed.
public
render_description() : mixed
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
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()
The file HTML.
protected
get_content(string $data, string $attributes) : string
Parameters
- $data : string
- $attributes : string
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()
Do these things when this object is invoked. Override in your class.
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
add_base_classes()
Add our base classes
private
add_base_classes() : mixed
set_attributes()
Set extra attributes.
private
set_attributes() : mixed
set_data()
Set the data.
private
set_data() : mixed
set_disabled_attribute()
Set disabled attribute
private
set_disabled_attribute() : mixed
set_id()
Set the ID
private
set_id() : mixed
set_on_change_attribute()
Set onChange attribute
private
set_on_change_attribute() : mixed
set_placeholder_attribute()
Set placeholder attribute
private
set_placeholder_attribute() : mixed
set_value()
Set the value
private
set_value() : mixed