Documentation

HardLinksSettingsGroup extends SettingsGroup
in package

Class defining the hard links settings.

Tags
since
2.8.0

Table of Contents

FOOTNOTE_FRAGMENT_ID_SLUG  = array('key' => 'footnotes_inputfield_footnote_fragment_id_slug', 'name' => 'Fragment Identifier Slug for Footnotes', 'description' => 'This will show up in the address bar after clicking on a hard-linked footnote referrer.', 'default_value' => 'f', 'type' => 'string', 'input_type' => 'text')
Settings container key for the fragment ID slug in footnotes.
FOOTNOTES_BACKLINK_TOOLTIP_ENABLE  = array('key' => 'footnotes_inputfield_backlink_tooltip_enable', 'name' => 'Enable Backlink Tooltips', 'description' => 'Hard backlinks get ordinary tooltips hinting to use the backbutton instead to keep it usable.', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Settings container key to enable backlink tooltips.
FOOTNOTES_BACKLINK_TOOLTIP_TEXT  = array('key' => 'footnotes_inputfield_backlink_tooltip_text', 'name' => 'Backlink Tooltip Text', 'description' => 'Default text is the keyboard shortcut; may be a localized descriptive hint.', 'default_value' => 'Alt + ←', 'type' => 'string', 'input_type' => 'text')
Settings container key to configure the backlink tooltip.
FOOTNOTES_HARD_LINKS_ENABLE  = array('key' => 'footnotes_inputfield_hard_links_enable', 'name' => 'Enable Hard Links', 'description' => 'Hard links disable jQuery delays but have the same scroll offset, and allow to share footnotes (accessed if the list is not collapsed by default).', 'default_value' => false, 'type' => 'boolean', 'input_type' => 'checkbox')
Settings container key to enable hard links.
GROUP_ID  = 'hard-links'
Setting group ID.
GROUP_NAME  = 'URL Fragment ID Configuration'
Setting group name.
HARD_LINK_IDS_SEPARATOR  = array('key' => 'footnotes_inputfield_hard_link_ids_separator', 'name' => 'ID Separator', 'description' => 'May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.', 'default_value' => '+', 'type' => 'string', 'input_type' => 'text')
Settings container key for the ID separator in fragment IDs.
REFERRER_FRAGMENT_ID_SLUG  = array('key' => 'footnotes_inputfield_referrer_fragment_id_slug', 'name' => 'Fragment Identifier Slug for Footnote Referrers', 'description' => 'This will show up in the address bar after clicking on a hard-linked backlink.', 'default_value' => 'r', 'type' => 'string', 'input_type' => 'text')
Settings container key for the fragment ID slug in referrers.
$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_FRAGMENT_ID_SLUG

Settings container key for the fragment ID slug in footnotes.

public array<string|int, mixed> FOOTNOTE_FRAGMENT_ID_SLUG = array('key' => 'footnotes_inputfield_footnote_fragment_id_slug', 'name' => 'Fragment Identifier Slug for Footnotes', 'description' => 'This will show up in the address bar after clicking on a hard-linked footnote referrer.', 'default_value' => 'f', 'type' => 'string', 'input_type' => 'text')
Tags
since
2.3.0
since
2.8.0

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

Settings container key to enable backlink tooltips.

public array<string|int, mixed> FOOTNOTES_BACKLINK_TOOLTIP_ENABLE = array('key' => 'footnotes_inputfield_backlink_tooltip_enable', 'name' => 'Enable Backlink Tooltips', 'description' => 'Hard backlinks get ordinary tooltips hinting to use the backbutton instead to keep it usable.', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')

When hard links are enabled, clicks on the backlinks are logged in the browsing history, along with clicks on the referrers. This tooltip hints to use the backbutton instead, so the history gets streamlined again. See here for more information.

Tags
since
2.5.4
since
2.8.0

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

Settings container key to configure the backlink tooltip.

public array<string|int, mixed> FOOTNOTES_BACKLINK_TOOLTIP_TEXT = array('key' => 'footnotes_inputfield_backlink_tooltip_text', 'name' => 'Backlink Tooltip Text', 'description' => 'Default text is the keyboard shortcut; may be a localized descriptive hint.', 'default_value' => 'Alt + ←', 'type' => 'string', 'input_type' => 'text')
Tags
since
2.5.4
since
2.8.0

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

Settings container key to enable hard links.

public array<string|int, mixed> FOOTNOTES_HARD_LINKS_ENABLE = array('key' => 'footnotes_inputfield_hard_links_enable', 'name' => 'Enable Hard Links', 'description' => 'Hard links disable jQuery delays but have the same scroll offset, and allow to share footnotes (accessed if the list is not collapsed by default).', 'default_value' => false, 'type' => 'boolean', 'input_type' => 'checkbox')

When the alternative reference container is enabled, hard links are too.

Tags
since
2.3.0
since
2.8.0

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

Settings container key for the ID separator in fragment IDs.

public array<string|int, mixed> HARD_LINK_IDS_SEPARATOR = array('key' => 'footnotes_inputfield_hard_link_ids_separator', 'name' => 'ID Separator', 'description' => 'May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.', 'default_value' => '+', 'type' => 'string', 'input_type' => 'text')
Tags
since
2.3.0
since
2.8.0

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

REFERRER_FRAGMENT_ID_SLUG

Settings container key for the fragment ID slug in referrers.

public array<string|int, mixed> REFERRER_FRAGMENT_ID_SLUG = array('key' => 'footnotes_inputfield_referrer_fragment_id_slug', 'name' => 'Fragment Identifier Slug for Footnote Referrers', 'description' => 'This will show up in the address bar after clicking on a hard-linked backlink.', 'default_value' => 'r', 'type' => 'string', 'input_type' => 'text')
Tags
since
2.3.0
since
2.8.0

Move from Settings to HardLinksSettingsGroup. 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

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