Documentation

NumberingSettingsGroup extends SettingsGroup
in package

Class defining the footnote numbering settings.

Tags
since
2.8.0

Table of Contents

COMBINE_IDENTICAL_FOOTNOTES  = array('key' => 'footnote_inputfield_combine_identical', 'name' => 'Combine Identical Footnotes', 'description' => 'This option may require copy-pasting footnotes in multiple instances. Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Settings container key for combining identical footnotes.
FOOTNOTES_COUNTER_STYLE  = array('key' => 'footnote_inputfield_counter_style', 'name' => 'Numbering Style', 'default_value' => 'arabic_plain', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('arabic_plain' => 'plain Arabic numbers (1, 2, 3, 4, 5, …)', 'arabic_leading' => 'zero-padded Arabic numbers (01, 02, 03, 04, 05, …)', 'latin_low' => 'lowercase Latin letters (a, b, c, d, e, …)', 'latin_high' => 'uppercase Latin letters (A, B, C, D, E, …)', 'romanic' => 'uppercase Roman numerals (I, II, III, IV, V, …)', 'roman_low' => 'lowercase Roman numerals (i, ii, iii, iv, v, …)'))
Settings container key for the counter style of the footnotes.
GROUP_ID  = 'numbering'
Setting group ID.
GROUP_NAME  = 'Footnotes Numbering'
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>
Creates an options group from the values of the settings in this section.
get_setting()  : Setting|null
Retrieve a setting by its key.
get_setting_value()  : mixed
Get a setting's value by its key.
set_setting_value()  : bool
Set a setting's value by its key.
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

COMBINE_IDENTICAL_FOOTNOTES

Settings container key for combining identical footnotes.

public array<string|int, mixed> COMBINE_IDENTICAL_FOOTNOTES = array('key' => 'footnote_inputfield_combine_identical', 'name' => 'Combine Identical Footnotes', 'description' => 'This option may require copy-pasting footnotes in multiple instances. Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Tags
link

Support for Ibid. notation added thanks to @meglio.

since
1.5.0
since
2.8.0

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

FOOTNOTES_COUNTER_STYLE

Settings container key for the counter style of the footnotes.

public array<string|int, mixed> FOOTNOTES_COUNTER_STYLE = array('key' => 'footnote_inputfield_counter_style', 'name' => 'Numbering Style', 'default_value' => 'arabic_plain', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('arabic_plain' => 'plain Arabic numbers (1, 2, 3, 4, 5, &hellip;)', 'arabic_leading' => 'zero-padded Arabic numbers (01, 02, 03, 04, 05, &hellip;)', 'latin_low' => 'lowercase Latin letters (a, b, c, d, e, &hellip;)', 'latin_high' => 'uppercase Latin letters (A, B, C, D, E, &hellip;)', 'romanic' => 'uppercase Roman numerals (I, II, III, IV, V, &hellip;)', 'roman_low' => 'lowercase Roman numerals (i, ii, iii, iv, v, &hellip;)'))
Tags
since
1.5.0
since
2.8.0

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

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

set_setting_value()

Set a setting's value by its key.

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

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