Opening_Hours_Setting implements Registerable
Handles the opening hours settings field.
Tags
Interfaces, Classes and Traits
- Registerable
Table of Contents
- SETTING_ID = 'opening_hours'
- $is_template_printed : bool
- $plugin : Plugin
- $template_loader : Template_Loader
- __construct() : mixed
- load_js_template() : mixed
- load_scripts() : mixed
- output_field() : mixed
- register() : mixed
- sanitize() : mixed
Constants
SETTING_ID
public
mixed
SETTING_ID
= 'opening_hours'
Tags
Properties
$is_template_printed
private
bool
$is_template_printed
= false
Record whether we have printed to JS template, to prevent double output.
Tags
$plugin
private
Plugin
$plugin
A plugin object - used for retrieving the assets folder URL and plugin version.
Tags
$template_loader
private
Template_Loader
$template_loader
Loads templates for the settings fields.
Tags
Methods
__construct()
public
__construct(Plugin $plugin) : mixed
Parameters
- $plugin : Plugin
Tags
Return values
mixed —load_js_template()
public
load_js_template() : mixed
Tags
Return values
mixed —load_scripts()
public
load_scripts() : mixed
Tags
Return values
mixed —output_field()
public
output_field(mixed $field) : mixed
Parameters
- $field : mixed
Tags
Return values
mixed —register()
public
register() : mixed
Tags
Return values
mixed —sanitize()
public
sanitize(mixed $value, mixed $option, mixed $raw_value) : mixed
Parameters
- $value : mixed
- $option : mixed
- $raw_value : mixed