Documentation

ReferrersSettingsGroup extends SettingsGroup
in package

Class defining the referrer settings.

Tags
since
2.8.0

Table of Contents

FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT  = array('key' => 'footnotes_inputfield_referrers_normal_superscript', 'name' => 'Normalize Vertical Alignment and Font Size', 'description' => 'Most themes don't need this fix.', 'default_value' => 'no', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('no' => 'No', 'referrers' => 'Footnote referrers', 'all' => 'All superscript elements'))
Settings container key to enable superscript style normalization.
FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS  = array('key' => 'footnotes_inputfield_referrer_superscript_tags', 'name' => 'Display Footnote Referrers in Superscript', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Settings container key for the referrer element.
FOOTNOTES_STYLING_AFTER  = array('key' => 'footnotes_inputfield_referrers_normal_superscript', 'name' => 'At the End of the Footnote Referrers', 'default_value' => ']', 'type' => 'string', 'input_type' => 'text')
Settings container key for the string after the footnote referrer.
FOOTNOTES_STYLING_BEFORE  = array('key' => 'footnote_inputfield_custom_styling_before', 'name' => 'At the Start of the Footnote Referrers', 'default_value' => '[', 'type' => 'string', 'input_type' => 'text')
Settings container key for the string before the footnote referrer.
GROUP_ID  = 'referrers'
Setting group ID.
GROUP_NAME  = 'Referrers'
Setting group name.
LINK_ELEMENT_ENABLED  = array('key' => 'footnote_inputfield_link_element_enabled', 'name' => 'Use the Link Element for Referrers and Backlinks', 'description' => 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme's link color.', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Settings container key
$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

FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT

Settings container key to enable superscript style normalization.

public array<string|int, mixed> FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT = array('key' => 'footnotes_inputfield_referrers_normal_superscript', 'name' => 'Normalize Vertical Alignment and Font Size', 'description' => 'Most themes don't need this fix.', 'default_value' => 'no', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('no' => 'No', 'referrers' => 'Footnote referrers', 'all' => 'All superscript elements'))
Tags
since
2.5.4
since
2.8.0

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

FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS

Settings container key for the referrer element.

public array<string|int, mixed> FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = array('key' => 'footnotes_inputfield_referrer_superscript_tags', 'name' => 'Display Footnote Referrers in Superscript', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Tags
since
2.1.1
since
2.8.0

Move from Settings to ReferenceContainerSettingsGroup. Convert from string to array. Convert setting data type from string to boolean.

FOOTNOTES_STYLING_AFTER

Settings container key for the string after the footnote referrer.

public array<string|int, mixed> FOOTNOTES_STYLING_AFTER = array('key' => 'footnotes_inputfield_referrers_normal_superscript', 'name' => 'At the End of the Footnote Referrers', 'default_value' => ']', 'type' => 'string', 'input_type' => 'text')
Tags
since
1.5.0
since
2.8.0

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

FOOTNOTES_STYLING_BEFORE

Settings container key for the string before the footnote referrer.

public array<string|int, mixed> FOOTNOTES_STYLING_BEFORE = array('key' => 'footnote_inputfield_custom_styling_before', 'name' => 'At the Start of the Footnote Referrers', 'default_value' => '[', 'type' => 'string', 'input_type' => 'text')

The default footnote referrer surroundings should be square brackets, as in English or US American typesetting, for better UX thanks to a more button-like appearance, as well as for stylistic consistency with the expand-collapse button.

Tags
since
1.5.0
since
2.8.0

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

Settings container key

public array<string|int, mixed> LINK_ELEMENT_ENABLED = array('key' => 'footnote_inputfield_link_element_enabled', 'name' => 'Use the Link Element for Referrers and Backlinks', 'description' => 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme's link color.', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Tags
since
2.1.4
since
2.8.0

Move from Settings to ReferenceContainerSettingsGroup. Convert from string to array. Convert setting data type from string to boolean.

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.

add_settings()

Add the settings for this settings group.

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

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

Tags
see
SettingsGroup::add_settings()
Return values
void

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