Opening_Hours_Setting implements Registerable

Handles the opening hours settings field.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

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

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

output_field()

public output_field(mixed $field) : mixed
Parameters
$field : mixed
Tags
Return values
mixed

sanitize()

public sanitize(mixed $value, mixed $option, mixed $raw_value) : mixed
Parameters
$value : mixed
$option : mixed
$raw_value : mixed
Tags
Return values
mixed

Search results