Documentation

ReferrersInLabelsSettingsGroup extends SettingsGroup
in package

Class defining the referrer in labels settings.

Tags
since
2.8.0

Table of Contents

FOOTNOTES_LABEL_ISSUE_SOLUTION  = array('key' => 'footnotes_inputfield_label_issue_solution', 'name' => 'Solve Input Label Issue', 'description' => 'Clicking a footnote referrer in an input element label toggles the input except when hard links are enabled. In jQuery mode, the recommended solution is to move footnotes and append them after the label (option A). Option B is discouraged because disconnecting a label from its input element may compromise accessibility. This option is a last resort in case footnotes must absolutely stay inside the label. (Using jQuery 'event.stopPropagation' failed.', 'default_value' => 'none', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('none' => '0. No problem or solved otherwise', 'move' => 'A. Footnotes are moved out and appended after the label's end (recommended)', 'disconnect' => 'B. Labels with footnotes are disconnected from input element (discouraged)'))
Settings container key to set the solution of the input element label issue.
GROUP_ID  = 'referrers-in-label'
Setting group ID.
GROUP_NAME  = 'Referrers in Labels'
Setting group name.
$options_group_slug  : string
Setting options group slug.
$section_slug  : string
Setting section slug.
$setting_classes  : array<string|int, mixed>
The setting classes.
$settings  : array<string|int, mixed>
The settings in this group.
$settings_obj  : Settings
The plugin settings object.
__construct()  : mixed
Constructs the settings section.
add_settings_fields()  : void
Adds all the settings fields for this group to the admin. dashboard.
get_options()  : array<string|int, mixed>
get_setting()  : Setting|null
get_setting_value()  : mixed
set_setting_value()  : bool
add_setting()  : Setting
Constructs settings from the provided details.
add_settings()  : void
Add the settings for this settings group.
load_dependencies()  : void
Load the required dependencies.
load_values()  : void
Load the values for this settings group.

Constants

FOOTNOTES_LABEL_ISSUE_SOLUTION

Settings container key to set the solution of the input element label issue.

public array<string|int, mixed> FOOTNOTES_LABEL_ISSUE_SOLUTION = array('key' => 'footnotes_inputfield_label_issue_solution', 'name' => 'Solve Input Label Issue', 'description' => 'Clicking a footnote referrer in an input element label toggles the input except when hard links are enabled. In jQuery mode, the recommended solution is to move footnotes and append them after the label (option A). Option B is discouraged because disconnecting a label from its input element may compromise accessibility. This option is a last resort in case footnotes must absolutely stay inside the label. (Using jQuery 'event.stopPropagation' failed.', 'default_value' => 'none', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('none' => '0. No problem or solved otherwise', 'move' => 'A. Footnotes are moved out and appended after the label's end (recommended)', 'disconnect' => 'B. Labels with footnotes are disconnected from input element (discouraged)'))

If hard links are not enabled, clicking a referrer in an input element label toggles the state of the input element the label is connected to. Beside hard links, other solutions include moving footnotes off the label and append them, or disconnecting this label from the input element (discouraged). See here for more information.

Tags
since
2.5.12
since
2.8.0

Move from Settings to ReferenceContainerSettingsGroup. Convert from string to array.

todo

Review, remove?

Properties

$options_group_slug

Setting options group slug.

protected string $options_group_slug
Tags
since
2.8.0

$setting_classes

The setting classes.

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

$settings

The settings in this group.

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

Methods

__construct()

Constructs the settings section.

public __construct(string $options_group_slug, string $section_slug, Settings $settings_obj) : mixed
Parameters
$options_group_slug : string
$section_slug : string
$settings_obj : Settings
Tags
since
2.8.0
Return values
mixed

add_settings_fields()

Adds all the settings fields for this group to the admin. dashboard.

public add_settings_fields(SettingsPage $component) : void
Parameters
$component : SettingsPage

The admin. dashboard settings page.

Tags
since
2.8.0
Return values
void

add_setting()

Constructs settings from the provided details.

protected add_setting(array<string, mixed> $setting) : Setting
Parameters
$setting : array<string, mixed>

The setting details.

Tags
since
2.8.0
Return values
Setting

The constructed setting object.

load_dependencies()

Load the required dependencies.

protected load_dependencies() : void

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

  • Setting: defines individual settings.
Tags
since
2.8.0
Return values
void

load_values()

Load the values for this settings group.

protected load_values(array<string, mixed>|false $options) : void
Parameters
$options : array<string, mixed>|false

Saved values for the settings in this group. 'False' if none exist.

Tags
since
2.8.0
todo

Remove settings from options group when not found.

Return values
void

Search results