Settings_Page implements Registerable, Service

Handles the WooCommerce settings page.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().
Service
Marker interface to denote a service.

Table of Contents

$id  : mixed
$label  : mixed
$license  : mixed
$plugin  : mixed
__construct()  : mixed
display_react_container()  : void
Echo's the react js container dom element.
get_settings()  : array<string|int, mixed>
Register section settings
register()  : void
Register hooks and filters
register_settings_section()  : array<string|int, mixed>
Register the settings section.
sanitize_date()  : mixed
Convert date options to timestamp when saving them.
sanitize_react_toggle()  : mixed
Make sure the toggle is saved properly, it can either be yer or no.
sanitize_text_color()  : string
Handle empty color value and set back to default.
update_react_options()  : void
Update the react js options into the database.

Properties

Methods

display_react_container()

Echo's the react js container dom element.

public display_react_container() : void
Return values
void

get_settings()

Register section settings

public get_settings(array<string|int, mixed> $settings, string $current_section) : array<string|int, mixed>
Parameters
$settings : array<string|int, mixed>
$current_section : string
Return values
array<string|int, mixed>

$settings

register()

Register hooks and filters

public register() : void
Return values
void

register_settings_section()

Register the settings section.

public register_settings_section(array<string|int, mixed> $sections) : array<string|int, mixed>
Parameters
$sections : array<string|int, mixed>
Return values
array<string|int, mixed>

$sections

sanitize_date()

Convert date options to timestamp when saving them.

public sanitize_date(mixed $value, array<string|int, mixed> $option, string $raw_value) : mixed
Parameters
$value : mixed
$option : array<string|int, mixed>
$raw_value : string
Return values
mixed

sanitize_react_toggle()

Make sure the toggle is saved properly, it can either be yer or no.

public sanitize_react_toggle(mixed $value, array<string|int, mixed> $option, string $raw_value) : mixed
Parameters
$value : mixed
$option : array<string|int, mixed>
$raw_value : string
Return values
mixed

sanitize_text_color()

Handle empty color value and set back to default.

public sanitize_text_color(string $value) : string
Parameters
$value : string
Tags
since
1.0.0
Return values
string

$value

update_react_options()

Update the react js options into the database.

public update_react_options() : void
Return values
void

Search results