Documentation

SettingsSection
in package

Abstract class defining a section of plugin settings.

Tags
abstract
since
2.8.0

Table of Contents

$options_group_slug  : string
Setting options group slug.
$section_slug  : string
Settings section slug.
$settings_groups  : array<string|int, mixed>
The groups of settings within this section.
$title  : string
Settings section title.
add_settings_fields()  : void
add_settings_section()  : void
get_options()  : array<string|int, mixed>
Creates an options group from the values of the settings in this section.
get_options_group_slug()  : string
get_section_slug()  : string
Gets the settings section slug.
get_setting()  : Setting|null
get_setting_value()  : mixed
get_settings_group()  : SettingsGroup|null
Gets a settings groups from this section by its ID.
get_title()  : string
Gets the settings section title.
load_options_group()  : void
set_setting_value()  : bool|null
setting_section_callback()  : void
add_settings_groups()  : void
Add the settings groups for this settings section.
load_dependencies()  : void
Load the required dependencies.

Properties

$options_group_slug

Setting options group slug.

protected string $options_group_slug
Tags
since
2.8.0

$settings_groups

The groups of settings within this section.

protected array<string|int, mixed> $settings_groups
Tags
since
2.8.0

Methods

add_settings_fields()

public add_settings_fields(mixed $component) : void
Parameters
$component : mixed
Return values
void

get_options()

Creates an options group from the values of the settings in this section.

public get_options() : array<string|int, mixed>
Tags
since
2.8.0
Return values
array<string|int, mixed>

The options group.

get_section_slug()

Gets the settings section slug.

public get_section_slug() : string
Tags
since
2.8.0
Return values
string

The section slug.

get_setting()

public get_setting(string $setting_key) : Setting|null
Parameters
$setting_key : string
Tags
see
Settings::get_setting()
Return values
Setting|null

get_setting_value()

public get_setting_value(string $setting_key) : mixed
Parameters
$setting_key : string
Tags
see
Settings::get_setting_value()
Return values
mixed

get_settings_group()

Gets a settings groups from this section by its ID.

public get_settings_group(string $group_id) : SettingsGroup|null
Parameters
$group_id : string
Tags
since
2.8.0
Return values
SettingsGroup|null

The section group. 'None' if none found.

get_title()

Gets the settings section title.

public get_title() : string
Tags
since
2.8.0
Return values
string

The section title.

set_setting_value()

public set_setting_value(string $setting_key, mixed $value) : bool|null
Parameters
$setting_key : string
$value : mixed
Tags
see
Settings::set_setting_value()
Return values
bool|null

add_settings_groups()

Add the settings groups for this settings section.

protected abstract add_settings_groups() : void
Tags
abstract
since
2.8.0
Return values
void

load_dependencies()

Load the required dependencies.

protected load_dependencies() : void

Include the following files that provide the settings for this section:

Tags
since
2.8.0
Return values
void

Search results