SLP_SmartOptions
extends SLPlus_BaseClass_Object
in package
Smart Options setup defines user settings and manages event triggers.
The Smart Options is an object that defines the user settings for Store Locator Plus. It helps define properties that are used to render the administrative UI, default values, and the behavior of the setting throughout the application.
Does things like execute functions when a value changes, set defaults.
The options management for the base plugin (replaces SLPlus->options / SLPlus->options_nojs)
Table of Contents
Properties
- $active_style_css : mixed
- $add_tel_to_phone : mixed
- $addon : object
- $address_placeholder : mixed
- $admin_notice_dismissed : mixed
- $ajax_orderby_catcount : mixed
- $append_to_search : mixed
- $bubblelayout : mixed
- $default_country : mixed
- $default_icons : mixed
- $delete_history_before_this_date : mixed
- $distance_unit : mixed
- $dropdown_style : mixed
- $email_link_format : mixed
- $first_entry_for_radius_selector : mixed
- $force_load_js : mixed
- $google_geocode_key : mixed
- $google_map_style : mixed
- $google_server_key : mixed
- $has_been_setup : mixed
- $hide_address_entry : mixed
- $hide_bubble : mixed
- $hide_distance : mixed
- $hide_empty : mixed
- $hide_map : mixed
- $hide_radius_selections : SLP_Option
- $hide_radius_selector : mixed
- $hide_search_form : mixed
- $highlight_uncoded : SLP_Option
- $immediately_show_locations : mixed
- $initial_radius : mixed
- $initial_results_returned : mixed
- $instructions : mixed
- $invalid_query_message : mixed
- $label_category : mixed
- $label_directions : mixed
- $label_email : mixed
- $label_fax : mixed
- $label_for_find_button : mixed
- $label_for_map_toggle : mixed
- $label_for_name : mixed
- $label_hours : mixed
- $label_image : mixed
- $label_phone : mixed
- $label_radius : mixed
- $label_search : mixed
- $label_website : mixed
- $last_geocoded_location : mixed
- $layout : mixed
- $loading_indicator : mixed
- $log_import_messages : mixed
- $log_schedule_messages : mixed
- $map_center : mixed
- $map_center_lat : mixed
- $map_center_lng : mixed
- $map_controls_subheader : mixed
- $map_end_icon : mixed
- $map_height : mixed
- $map_height_units : mixed
- $map_home_icon : mixed
- $map_initial_display : mixed
- $map_marker_tooltip : mixed
- $map_options_mapTypeControl : mixed
- $map_options_scaleControl : mixed
- $map_type : mixed
- $map_width : mixed
- $map_width_units : mixed
- $maplayout : mixed
- $max_results_returned : mixed
- $message_bad_address : mixed
- $message_no_results : mixed
- $myslp : MySLP
- $name_placeholder : mixed
- $no_autozoom : mixed
- $no_homeicon_at_start : mixed
- $page_layout : mixed
- $pages_directory_entry_css_class : mixed
- $pages_directory_wrapper_css_class : mixed
- $permalink_flush_needed : mixed
- $premium_subscription_id : mixed
- $premium_user_id : mixed
- $radii : mixed
- $remove_credits : mixed
- $reporting_enabled : mixed
- $results_box_title : mixed
- $resultslayout : mixed
- $search_appearance_category_header : mixed
- $search_appearance_tag_header : mixed
- $search_box_title : mixed
- $search_by_name : mixed
- $searchlayout : mixed
- $show_cats_on_search : mixed
- $show_country : mixed
- $show_hours : mixed
- $show_icon_array : mixed
- $show_legend_text : mixed
- $show_maptoggle : mixed
- $show_option_all : mixed
- $slplus : SLPlus
- $starting_image : mixed
- $style : mixed
- $style_id : mixed
- $tag_autosubmit : mixed
- $tag_dropdown_first_entry : mixed
- $tag_label : mixed
- $tag_output_processing : mixed
- $tag_selections : mixed
- $tag_selector : mixed
- $text_options : mixed
- $theme : mixed
- $url_allow_address : mixed
- $url_control_description : mixed
- $use_contact_fields : mixed
- $use_nonces : mixed
- $use_pages : mixed
- $use_sensor : mixed
- $uses_myslp : bool
- $uses_slplus : bool
- $zoom_level : mixed
- $zoom_tweak : mixed
- $change_callbacks : mixed
- $slug : mixed
- $time_callbacks : mixed
- $allow_limit_in_url : mixed
- $allow_location_in_url : mixed
- $allow_tag_in_url : mixed
- $block_ip_limit : mixed
- $block_ip_period : mixed
- $block_ip_release_after : mixed
- $boundaries_influence_type : mixed
- $bubble_footnote : mixed
- $cluster_gridsize : mixed
- $cluster_minimum : mixed
- $clusters_enabled : mixed
- $current_callback : mixed
- $current_checkboxes : mixed
- $db_loading : mixed
- $first_entry_for_zip_selector : mixed
- $initial_distance_already_calculated : mixed
- $initialized : mixed
- $ip_whitelist : mixed
- $label_for_zip_selector : mixed
- $loading_indicator_color : mixed
- $loading_indicator_location : mixed
- $map_appearance_cluster_header : mixed
- $map_option_fullscreenControl : mixed
- $map_option_hide_streetview : mixed
- $map_option_zoomControl : mixed
- $map_options_clickableIcons : mixed
- $no_results_gf_id : mixed
- $no_results_gf_landing_page : mixed
- $no_results_interface : mixed
- $page_options : mixed
- $pagination_enabled : mixed
- $phone_extension_delimiter : mixed
- $results_click_animate_marker : mixed
- $results_click_label_marker : mixed
- $results_click_map_movement : mixed
- $results_click_marker_icon : mixed
- $results_click_marker_icon_behavior : mixed
- $results_header : mixed
- $results_header_1 : mixed
- $results_header_2 : mixed
- $results_header_3 : mixed
- $results_header_4 : mixed
- $results_no_wrapper : mixed
- $schedule_for_geocoding : mixed
- $schedule_for_initial_distance : mixed
- $search_box_subtitle : mixed
- $search_on_map_move : mixed
- $smart_properties : mixed
- $use_territory_bounds : mixed
- $zip_selector : mixed
Methods
- __construct() : mixed
- __get() : SLP_Option|null
- Get something for non-existent properties.
- __isset() : bool
- change_map_center() : mixed
- Things we do when a new map center is set.
- change_style_id() : mixed
- Run this when the style ID changes.
- create_smart_options() : mixed
- Create smart option objects and set to default_if_empty values.
- execute_change_callbacks() : mixed
- Execute the stack of change callbacks.
- execute_time_callbacks() : mixed
- Execute the stack of time callbacks.
- exists() : bool
- Does the specified slug exist as a smart option?
- exists_and_active() : bool
- Check if a property exists and is active.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- get_option_name() : string
- Return the property formatted option name.
- get_options() : mixed
- Get a list of Smart Options
- get_page_options() : array<string|int, mixed>
- Get a list of options that reside on the specified admin page.
- get_setting_params() : array<string|int, mixed>
- Get the parameters needed for the SLP_Settings entry.
- get_text_options() : array<string|int, string>
- Return a list of option slugs that are text options.
- get_TypeOf() : string|null
- Get the type for the Smart Option.
- get_ValueOf() : mixed|null
- Check if a given property exists and return the value.
- initialize() : mixed
- Things we do at the start.
- is_false() : bool
- Check if a given property is false.
- is_true() : bool
- Check if a given property is true.
- only_smart_options() : bool
- Return true if the element is an SLP_Option -- call get_options()
- recalculate_initial_distance() : mixed
- Recalculate the initial distance for a location from the map center.
- save() : mixed
- Save the options for the given admin page.
- set() : bool
- Set the smart option value and the legacy options/options_nojs
- set_checkboxes() : mixed
- Set incoming REQUEST checkboxes for the current admin page. Only run on admin pages.
- set_properties() : mixed
- Set our properties.
- set_valid_options() : bool
- Set valid slplus->options and copy to SmartOptions
- set_valid_options_nojs() : bool
- Set valid slplus->options_nojs and copy to SmartOptions
- slp_init_complete() : void
- Call when slp_init_complete is called, which is after user is authenticated (wp init)
- slp_specific_setup() : mixed
- Initialize the options properties from the WordPress database.
- strip_slashes_if_text() : mixed
- Strip slashes from value if this is a text entry.
- trim() : mixed
- Trim the string.
- create_general_options() : mixed
- General
- create_settings_options() : mixed
- Settings
- create_system_wide_options() : mixed
- System Wide Smart Options
- experience_map_appearance() : mixed
- Settings / Map / Appearance
- experience_map_at_startup() : mixed
- Settings / Map / At Startup
- experience_map_functionality() : mixed
- Settings / Map / Functionality
- experience_map_markers() : mixed
- Settings / Map / Markers
- experience_results_after_search() : mixed
- Settings / Results / After Search
- experience_results_at_startup() : mixed
- Settings / Results / At Startup
- experience_results_labels() : mixed
- Settings / Results / Labels
- experience_search_functionality() : mixed
- Settings / Search / Functionality
- experience_search_labels() : mixed
- Settings / Search / Labels
- general_admin_addons() : mixed
- General > Admin > Addons
- general_admin_messages() : mixed
- General / Admin
- general_app_map_services() : mixed
- General | App | Map Services
- general_user_interface() : mixed
- General | User Interface | URL Controls
- get_original_value() : mixed
- Remember the original value of a setting before we change it.
- get_string_default() : string
- Get string defaults.
- results_appearance() : mixed
- Results / Appearance
- results_appearance_no_results() : mixed
- Results | Appearance | No Results
- set_current_checkboxes() : mixed
- Builds a list of checkboxes for the current admin settings page.
- set_text_string_defaults() : mixed
- Set text string defaults.
- set_the_val() : mixed
- Set the value of a smart option & legacy option array copy
- set_valid_option() : bool
- Set an option in an array only if the key already exists, for empty values set to default.
- settings_search_appearance() : mixed
- Settings / Search / Appearance
- setup_smart_callback() : mixed
- Set value change callback methods for smart options.
- view_appearance() : mixed
- Settings / View / Appearance
Properties
$active_style_css
public
mixed
$active_style_css
$add_tel_to_phone
public
mixed
$add_tel_to_phone
$addon
public
object
$addon
$address_placeholder
public
mixed
$address_placeholder
$admin_notice_dismissed
public
mixed
$admin_notice_dismissed
$ajax_orderby_catcount
public
mixed
$ajax_orderby_catcount
$append_to_search
public
mixed
$append_to_search
$bubblelayout
public
mixed
$bubblelayout
$default_country
public
mixed
$default_country
$default_icons
public
mixed
$default_icons
$delete_history_before_this_date
public
mixed
$delete_history_before_this_date
$distance_unit
public
mixed
$distance_unit
$dropdown_style
public
mixed
$dropdown_style
$email_link_format
public
mixed
$email_link_format
$first_entry_for_radius_selector
public
mixed
$first_entry_for_radius_selector
$force_load_js
public
mixed
$force_load_js
$google_geocode_key
public
mixed
$google_geocode_key
$google_map_style
public
mixed
$google_map_style
$google_server_key
public
mixed
$google_server_key
$has_been_setup
public
mixed
$has_been_setup
= \false
$hide_address_entry
public
mixed
$hide_address_entry
$hide_bubble
public
mixed
$hide_bubble
$hide_distance
public
mixed
$hide_distance
$hide_empty
public
mixed
$hide_empty
$hide_map
public
mixed
$hide_map
$hide_radius_selections
public
SLP_Option
$hide_radius_selections
$hide_radius_selector
public
mixed
$hide_radius_selector
$hide_search_form
public
mixed
$hide_search_form
$highlight_uncoded
public
SLP_Option
$highlight_uncoded
$immediately_show_locations
public
mixed
$immediately_show_locations
$initial_radius
public
mixed
$initial_radius
$initial_results_returned
public
mixed
$initial_results_returned
$instructions
public
mixed
$instructions
$invalid_query_message
public
mixed
$invalid_query_message
$label_category
public
mixed
$label_category
$label_directions
public
mixed
$label_directions
$label_email
public
mixed
$label_email
$label_fax
public
mixed
$label_fax
$label_for_find_button
public
mixed
$label_for_find_button
$label_for_map_toggle
public
mixed
$label_for_map_toggle
$label_for_name
public
mixed
$label_for_name
$label_hours
public
mixed
$label_hours
$label_image
public
mixed
$label_image
$label_phone
public
mixed
$label_phone
$label_radius
public
mixed
$label_radius
$label_search
public
mixed
$label_search
$label_website
public
mixed
$label_website
$last_geocoded_location
public
mixed
$last_geocoded_location
$layout
public
mixed
$layout
$loading_indicator
public
mixed
$loading_indicator
$log_import_messages
public
mixed
$log_import_messages
$log_schedule_messages
public
mixed
$log_schedule_messages
$map_center
public
mixed
$map_center
$map_center_lat
public
mixed
$map_center_lat
$map_center_lng
public
mixed
$map_center_lng
$map_controls_subheader
public
mixed
$map_controls_subheader
$map_end_icon
public
mixed
$map_end_icon
$map_height
public
mixed
$map_height
$map_height_units
public
mixed
$map_height_units
$map_home_icon
public
mixed
$map_home_icon
$map_initial_display
public
mixed
$map_initial_display
$map_marker_tooltip
public
mixed
$map_marker_tooltip
$map_options_mapTypeControl
public
mixed
$map_options_mapTypeControl
$map_options_scaleControl
public
mixed
$map_options_scaleControl
$map_type
public
mixed
$map_type
$map_width
public
mixed
$map_width
$map_width_units
public
mixed
$map_width_units
$maplayout
public
mixed
$maplayout
$max_results_returned
public
mixed
$max_results_returned
$message_bad_address
public
mixed
$message_bad_address
$message_no_results
public
mixed
$message_no_results
$myslp
public
MySLP
$myslp
$name_placeholder
public
mixed
$name_placeholder
$no_autozoom
public
mixed
$no_autozoom
$no_homeicon_at_start
public
mixed
$no_homeicon_at_start
$page_layout
public
mixed
$page_layout
$pages_directory_entry_css_class
public
mixed
$pages_directory_entry_css_class
$pages_directory_wrapper_css_class
public
mixed
$pages_directory_wrapper_css_class
$permalink_flush_needed
public
mixed
$permalink_flush_needed
$premium_subscription_id
public
mixed
$premium_subscription_id
$premium_user_id
public
mixed
$premium_user_id
$radii
public
mixed
$radii
$remove_credits
public
mixed
$remove_credits
$reporting_enabled
public
mixed
$reporting_enabled
$results_box_title
public
mixed
$results_box_title
$resultslayout
public
mixed
$resultslayout
$search_appearance_category_header
public
mixed
$search_appearance_category_header
$search_appearance_tag_header
public
mixed
$search_appearance_tag_header
$search_box_title
public
mixed
$search_box_title
$search_by_name
public
mixed
$search_by_name
$searchlayout
public
mixed
$searchlayout
$show_cats_on_search
public
mixed
$show_cats_on_search
$show_country
public
mixed
$show_country
$show_hours
public
mixed
$show_hours
$show_icon_array
public
mixed
$show_icon_array
$show_legend_text
public
mixed
$show_legend_text
$show_maptoggle
public
mixed
$show_maptoggle
$show_option_all
public
mixed
$show_option_all
$slplus
public
SLPlus
$slplus
$starting_image
public
mixed
$starting_image
$style
public
mixed
$style
$style_id
public
mixed
$style_id
$tag_autosubmit
public
mixed
$tag_autosubmit
$tag_dropdown_first_entry
public
mixed
$tag_dropdown_first_entry
$tag_label
public
mixed
$tag_label
$tag_output_processing
public
mixed
$tag_output_processing
$tag_selections
public
mixed
$tag_selections
$tag_selector
public
mixed
$tag_selector
$text_options
public
mixed
$text_options
$theme
public
mixed
$theme
$url_allow_address
public
mixed
$url_allow_address
$url_control_description
public
mixed
$url_control_description
$use_contact_fields
public
mixed
$use_contact_fields
$use_nonces
public
mixed
$use_nonces
$use_pages
public
mixed
$use_pages
$use_sensor
public
mixed
$use_sensor
$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.
$zoom_level
public
mixed
$zoom_level
$zoom_tweak
public
mixed
$zoom_tweak
$change_callbacks
protected
mixed
$change_callbacks
= array()
$slug
protected
mixed
$slug
$time_callbacks
protected
mixed
$time_callbacks
= array()
$allow_limit_in_url
private
mixed
$allow_limit_in_url
$allow_location_in_url
private
mixed
$allow_location_in_url
$allow_tag_in_url
private
mixed
$allow_tag_in_url
$block_ip_limit
private
mixed
$block_ip_limit
$block_ip_period
private
mixed
$block_ip_period
$block_ip_release_after
private
mixed
$block_ip_release_after
$boundaries_influence_type
private
mixed
$boundaries_influence_type
$bubble_footnote
private
mixed
$bubble_footnote
$cluster_gridsize
private
mixed
$cluster_gridsize
$cluster_minimum
private
mixed
$cluster_minimum
$clusters_enabled
private
mixed
$clusters_enabled
$current_callback
private
mixed
$current_callback
$current_checkboxes
private
mixed
$current_checkboxes
$db_loading
private
mixed
$db_loading
= \false
$first_entry_for_zip_selector
private
mixed
$first_entry_for_zip_selector
$initial_distance_already_calculated
private
mixed
$initial_distance_already_calculated
= \false
$initialized
private
mixed
$initialized
= \false
$ip_whitelist
private
mixed
$ip_whitelist
$label_for_zip_selector
private
mixed
$label_for_zip_selector
$loading_indicator_color
private
mixed
$loading_indicator_color
$loading_indicator_location
private
mixed
$loading_indicator_location
$map_appearance_cluster_header
private
mixed
$map_appearance_cluster_header
$map_option_fullscreenControl
private
mixed
$map_option_fullscreenControl
$map_option_hide_streetview
private
mixed
$map_option_hide_streetview
$map_option_zoomControl
private
mixed
$map_option_zoomControl
$map_options_clickableIcons
private
mixed
$map_options_clickableIcons
$no_results_gf_id
private
mixed
$no_results_gf_id
$no_results_gf_landing_page
private
mixed
$no_results_gf_landing_page
$no_results_interface
private
mixed
$no_results_interface
$page_options
private
mixed
$page_options
$pagination_enabled
private
mixed
$pagination_enabled
$phone_extension_delimiter
private
mixed
$phone_extension_delimiter
$results_click_animate_marker
private
mixed
$results_click_animate_marker
$results_click_label_marker
private
mixed
$results_click_label_marker
$results_click_map_movement
private
mixed
$results_click_map_movement
$results_click_marker_icon
private
mixed
$results_click_marker_icon
$results_click_marker_icon_behavior
private
mixed
$results_click_marker_icon_behavior
$results_header
private
mixed
$results_header
$results_header_1
private
mixed
$results_header_1
$results_header_2
private
mixed
$results_header_2
$results_header_3
private
mixed
$results_header_3
$results_header_4
private
mixed
$results_header_4
$results_no_wrapper
private
mixed
$results_no_wrapper
$schedule_for_geocoding
private
mixed
$schedule_for_geocoding
$schedule_for_initial_distance
private
mixed
$schedule_for_initial_distance
$search_box_subtitle
private
mixed
$search_box_subtitle
$search_on_map_move
private
mixed
$search_on_map_move
$smart_properties
private
mixed
$smart_properties
$use_territory_bounds
private
mixed
$use_territory_bounds
$zip_selector
private
mixed
$zip_selector
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
Get something for non-existent properties.
public
__get(mixed $property) : SLP_Option|null
Parameters
- $property : mixed
Return values
SLP_Option|null__isset()
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
boolchange_map_center()
Things we do when a new map center is set.
public
change_map_center() : mixed
TODO: look up the address and set the lat/long.
change_style_id()
Run this when the style ID changes.
public
change_style_id(mixed $key, mixed $old_val, mixed $new_val) : mixed
Parameters
- $key : mixed
- $old_val : mixed
- $new_val : mixed
create_smart_options()
Create smart option objects and set to default_if_empty values.
public
create_smart_options(array<string|int, mixed> $smart_option_params[, array<string|int, mixed> $defaults = array() ]) : mixed
Parameters
- $smart_option_params : array<string|int, mixed>
-
An array of smart option attributes.
- $defaults : array<string|int, mixed> = array()
-
If not empty, set this as the default for every smart_option_params entry.
execute_change_callbacks()
Execute the stack of change callbacks.
public
execute_change_callbacks() : mixed
Use this to run callbacks after all options have been updated.
Tags
execute_time_callbacks()
Execute the stack of time callbacks.
public
execute_time_callbacks() : mixed
Use this to run callbacks after all options have been updated.
exists()
Does the specified slug exist as a smart option?
public
exists(string $property) : bool
Parameters
- $property : string
Return values
boolexists_and_active()
Check if a property exists and is active.
public
exists_and_active(string $property) : bool
Parameters
- $property : string
-
The name of the property to check.
Return values
bool —Returns true if the property exists and is not null, false otherwise.
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
staticget_option_name()
Return the property formatted option name.
public
get_option_name(mixed $property) : string
Parameters
- $property : mixed
Return values
stringget_options()
Get a list of Smart Options
public
get_options() : mixed
Tags
get_page_options()
Get a list of options that reside on the specified admin page.
public
get_page_options(string $admin_page) : array<string|int, mixed>
Parameters
- $admin_page : string
Return values
array<string|int, mixed>get_setting_params()
Get the parameters needed for the SLP_Settings entry.
public
get_setting_params(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
Return values
array<string|int, mixed>get_text_options()
Return a list of option slugs that are text options.
public
get_text_options() : array<string|int, string>
Return values
array<string|int, string>get_TypeOf()
Get the type for the Smart Option.
public
get_TypeOf(mixed $property) : string|null
Parameters
- $property : mixed
Return values
string|null —type as a string (i.e. "checkbox") or null if property does not exist.
get_ValueOf()
Check if a given property exists and return the value.
public
get_ValueOf(string $property) : mixed|null
Parameters
- $property : string
-
The property to check.
Return values
mixed|nullinitialize()
Things we do at the start.
public
initialize() : mixed
is_false()
Check if a given property is false.
public
is_false(string $property) : bool
Parameters
- $property : string
-
The property to check.
Return values
bool —Returns true if the property exists and is not null, and its 'is_true' property is true. Otherwise, returns false.
is_true()
Check if a given property is true.
public
is_true(string $property) : bool
Parameters
- $property : string
-
The property to check.
Return values
bool —Returns true if the property exists and is not null, and its 'is_true' property is true. Otherwise, returns false.
only_smart_options()
Return true if the element is an SLP_Option -- call get_options()
public
static only_smart_options(mixed $element) : bool
Parameters
- $element : mixed
Tags
Return values
boolrecalculate_initial_distance()
Recalculate the initial distance for a location from the map center.
public
recalculate_initial_distance() : mixed
Called if 'distance_unit' changes.
call_when_changed alway gets 3 params whether or not they are used...
save()
Save the options for the given admin page.
public
save([string $admin_page = '' ]) : mixed
Parameters
- $admin_page : string = ''
set()
Set the smart option value and the legacy options/options_nojs
public
set(mixed $property, mixed $value[, bool $writeToDB = false ]) : bool
Parameters
- $property : mixed
- $value : mixed
- $writeToDB : bool = false
Return values
boolset_checkboxes()
Set incoming REQUEST checkboxes for the current admin page. Only run on admin pages.
public
set_checkboxes(string $admin_page) : mixed
Parameters
- $admin_page : string
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
set_valid_options()
Set valid slplus->options and copy to SmartOptions
public
set_valid_options(mixed $val, mixed $key) : bool
Parameters
- $val : mixed
- $key : mixed
Return values
boolset_valid_options_nojs()
Set valid slplus->options_nojs and copy to SmartOptions
public
set_valid_options_nojs(mixed $val, mixed $key) : bool
Parameters
- $val : mixed
- $key : mixed
Return values
boolslp_init_complete()
Call when slp_init_complete is called, which is after user is authenticated (wp init)
public
slp_init_complete() : void
slp_specific_setup()
Initialize the options properties from the WordPress database.
public
slp_specific_setup() : mixed
Called by MySLP Dashboard.
strip_slashes_if_text()
Strip slashes from value if this is a text entry.
public
strip_slashes_if_text(string &$val, string $key) : mixed
Parameters
- $val : string
- $key : string
trim()
Trim the string.
public
trim(string $key, string $old_val, string $new_val) : mixed
Parameters
- $key : string
- $old_val : string
- $new_val : string
create_general_options()
General
private
create_general_options() : mixed
create_settings_options()
Settings
private
create_settings_options() : mixed
create_system_wide_options()
System Wide Smart Options
private
create_system_wide_options() : mixed
experience_map_appearance()
Settings / Map / Appearance
private
experience_map_appearance() : mixed
experience_map_at_startup()
Settings / Map / At Startup
private
experience_map_at_startup() : mixed
experience_map_functionality()
Settings / Map / Functionality
private
experience_map_functionality() : mixed
experience_map_markers()
Settings / Map / Markers
private
experience_map_markers() : mixed
experience_results_after_search()
Settings / Results / After Search
private
experience_results_after_search() : mixed
experience_results_at_startup()
Settings / Results / At Startup
private
experience_results_at_startup() : mixed
experience_results_labels()
Settings / Results / Labels
private
experience_results_labels() : mixed
experience_search_functionality()
Settings / Search / Functionality
private
experience_search_functionality() : mixed
experience_search_labels()
Settings / Search / Labels
private
experience_search_labels() : mixed
general_admin_addons()
General > Admin > Addons
private
general_admin_addons() : mixed
general_admin_messages()
General / Admin
private
general_admin_messages() : mixed
general_app_map_services()
General | App | Map Services
private
general_app_map_services() : mixed
general_user_interface()
General | User Interface | URL Controls
private
general_user_interface() : mixed
get_original_value()
Remember the original value of a setting before we change it.
private
get_original_value(mixed $new_value, mixed $key, mixed &$option_array, mixed $is_smart_option, mixed $valid_legacy_option) : mixed
Parameters
- $new_value : mixed
- $key : mixed
- $option_array : mixed
- $is_smart_option : mixed
- $valid_legacy_option : mixed
get_string_default()
Get string defaults.
private
get_string_default(string $key) : string
Parameters
- $key : string
-
key name for string to translate
Return values
stringresults_appearance()
Results / Appearance
private
results_appearance() : mixed
results_appearance_no_results()
Results | Appearance | No Results
private
results_appearance_no_results() : mixed
set_current_checkboxes()
Builds a list of checkboxes for the current admin settings page.
private
set_current_checkboxes(string $admin_page) : mixed
Parameters
- $admin_page : string
set_text_string_defaults()
Set text string defaults.
private
set_text_string_defaults() : mixed
set_the_val()
Set the value of a smart option & legacy option array copy
private
set_the_val(mixed $value, mixed $key, mixed &$option_array, mixed $is_smart_option, mixed $valid_legacy_option) : mixed
Parameters
- $value : mixed
- $key : mixed
- $option_array : mixed
- $is_smart_option : mixed
- $valid_legacy_option : mixed
set_valid_option()
Set an option in an array only if the key already exists, for empty values set to default.
private
set_valid_option(mixed $val, string $key, string $which_option) : bool
External classes should use set_valid_options / set_valid_options_nojs.
Parameters
- $val : mixed
-
the value of a form var
- $key : string
-
the key for that form var
- $which_option : string
-
which array to use
Return values
boolsettings_search_appearance()
Settings / Search / Appearance
private
settings_search_appearance() : mixed
setup_smart_callback()
Set value change callback methods for smart options.
private
setup_smart_callback(mixed $key, mixed $original_value) : mixed
That are defined as on this page (or the page is not defined) Whose original value from slplus->options or slplus->options_nojs DOES NOT match the new value (from the DB usually) ... reset the original value temp var to the smart option default value (if provided , null if not provided) ... and set the smart option to the new value if not empty or the smart option default if the new value was empty
Parameters
- $key : mixed
- $original_value : mixed
view_appearance()
Settings / View / Appearance
private
view_appearance() : mixed