Documentation

ShortcodeSettingsGroup extends SettingsGroup
in package

Class defining the footnote shortcode delimiter settings.

Tags
since
2.8.0

Table of Contents

FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE  = array('key' => 'footnotes_inputfield_shortcode_syntax_validation_enable', 'name' => 'Check for Balanced Shortcodes', 'description' => 'In the presence of a lone start tag shortcode, a warning displays below the post title. If the start tag short code is <q>((</q> or <q>(((</q>, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Settings container key to enable shortcode syntax validation.
FOOTNOTES_SHORT_CODE_END  = array('key' => 'footnote_inputfield_placeholder_end', 'name' => 'Footnote End Tag Short Code', 'default_value' => '))', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('))' => '))', ')))' => ')))', '}}' => '}}', '}}}' => '}}}', '[/n]' => '[/n]', '[/fn]' => '[/fn]', '</fn>' => '&lt;/fn&gt;', '</ref>' => '&lt;/ref&gt;', 'userdefined' => 'custom short code'))
Settings container key for the short code of the footnote's end.
FOOTNOTES_SHORT_CODE_END_USER_DEFINED  = array('key' => 'footnote_inputfield_placeholder_end_user_defined', 'name' => 'User-defined End Shortcode', 'type' => 'string', 'input_type' => 'text', 'enabled_by' => self::FOOTNOTES_SHORT_CODE_END)
Settings container key for the user-defined short code of the footnotes end.
FOOTNOTES_SHORT_CODE_START  = array('key' => 'footnote_inputfield_placeholder_start', 'name' => 'Footnote Start Tag Short Code', 'description' => 'When delimiters with pointy brackets are used, the diverging escapement schemas will be unified before footnotes are processed. WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.', 'default_value' => '((', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('((' => '((', '(((' => '(((', '{{' => '{{', '{{{' => '{{{', '[n]' => '[n]', '[fn]' => '[fn]', '<fn>' => '&lt;fn&gt;', '<ref>' => '&lt;ref&gt;', 'userdefined' => 'custom short code'))
Settings container key for the short code of the footnote's start.
FOOTNOTES_SHORT_CODE_START_USER_DEFINED  = array('key' => 'footnote_inputfield_placeholder_start_user_defined', 'name' => 'User-defined Start Shortcode', 'type' => 'string', 'input_type' => 'text', 'enabled_by' => self::FOOTNOTES_SHORT_CODE_START)
Settings container key for the user-defined short code of the footnotes start.
GROUP_ID  = 'shortcode'
Setting group ID.
GROUP_NAME  = 'Footnote Start and End Short Codes'
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

FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE

Settings container key to enable shortcode syntax validation.

public array<string|int, mixed> FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE = array('key' => 'footnotes_inputfield_shortcode_syntax_validation_enable', 'name' => 'Check for Balanced Shortcodes', 'description' => 'In the presence of a lone start tag shortcode, a warning displays below the post title. If the start tag short code is <q>((</q> or <q>(((</q>, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox')
Tags
since
2.4.0
since
2.8.0

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

FOOTNOTES_SHORT_CODE_END

Settings container key for the short code of the footnote's end.

public array<string|int, mixed> FOOTNOTES_SHORT_CODE_END = array('key' => 'footnote_inputfield_placeholder_end', 'name' => 'Footnote End Tag Short Code', 'default_value' => '))', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('))' => '))', ')))' => ')))', '}}' => '}}', '}}}' => '}}}', '[/n]' => '[/n]', '[/fn]' => '[/fn]', '</fn>' => '&lt;/fn&gt;', '</ref>' => '&lt;/ref&gt;', 'userdefined' => 'custom short code'))
Tags
since
1.5.0
since
2.8.0

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

FOOTNOTES_SHORT_CODE_END_USER_DEFINED

Settings container key for the user-defined short code of the footnotes end.

public array<string|int, mixed> FOOTNOTES_SHORT_CODE_END_USER_DEFINED = array('key' => 'footnote_inputfield_placeholder_end_user_defined', 'name' => 'User-defined End Shortcode', 'type' => 'string', 'input_type' => 'text', 'enabled_by' => self::FOOTNOTES_SHORT_CODE_END)
Tags
since
1.5.0
since
2.8.0

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

FOOTNOTES_SHORT_CODE_START

Settings container key for the short code of the footnote's start.

public array<string|int, mixed> FOOTNOTES_SHORT_CODE_START = array('key' => 'footnote_inputfield_placeholder_start', 'name' => 'Footnote Start Tag Short Code', 'description' => 'When delimiters with pointy brackets are used, the diverging escapement schemas will be unified before footnotes are processed. WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.', 'default_value' => '((', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('((' => '((', '(((' => '(((', '{{' => '{{', '{{{' => '{{{', '[n]' => '[n]', '[fn]' => '[fn]', '<fn>' => '&lt;fn&gt;', '<ref>' => '&lt;ref&gt;', 'userdefined' => 'custom short code'))
Tags
since
1.5.0
since
2.8.0

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

FOOTNOTES_SHORT_CODE_START_USER_DEFINED

Settings container key for the user-defined short code of the footnotes start.

public array<string|int, mixed> FOOTNOTES_SHORT_CODE_START_USER_DEFINED = array('key' => 'footnote_inputfield_placeholder_start_user_defined', 'name' => 'User-defined Start Shortcode', 'type' => 'string', 'input_type' => 'text', 'enabled_by' => self::FOOTNOTES_SHORT_CODE_START)
Tags
since
1.5.0
since
2.8.0

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