Documentation

ScrollingSettingsGroup extends SettingsGroup
in package

Class defining the scrolling settings.

Tags
since
2.8.0

Table of Contents

FOOTNOTES_CSS_SMOOTH_SCROLLING  = array('key' => 'footnotes_inputfield_css_smooth_scrolling', 'name' => 'CSS-based Smooth Scrolling', 'description' => 'May slightly disturb jQuery scrolling and is therefore disabled by default. Works in recent browsers.', 'default_value' => false, 'type' => 'boolean', 'input_type' => 'checkbox')
Settings container key to enable CSS smooth scrolling.
FOOTNOTES_SCROLL_DOWN_DELAY  = array('key' => 'footnotes_inputfield_scroll_down_delay', 'name' => 'Scroll-down Delay', 'description' => 'milliseconds. Useful to see the effect on input elements when referrers without hard links are clicked in form labels.', 'default_value' => 0, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 20000, 'input_min' => 0)
Settings container key for scroll-down delay.
FOOTNOTES_SCROLL_DOWN_DURATION  = array('key' => 'footnotes_inputfield_scroll_down_duration', 'name' => 'Scroll-down Duration', 'description' => 'milliseconds', 'default_value' => 150, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 20000, 'input_min' => 0, 'enabled_by' => self::FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY)
Settings container key for scroll duration.
FOOTNOTES_SCROLL_DURATION  = array('key' => 'footnotes_inputfield_scroll_duration', 'name' => 'Scroll Duration', 'description' => 'milliseconds. If asymmetric scroll durations are enabled, this is the scroll-up duration.', 'default_value' => 380, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 20000, 'input_min' => 0)
Settings container key for scroll duration.
FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY  = array('key' => 'footnotes_inputfield_scroll_duration_asymmetricity', 'name' => 'Enable Asymmetric Scroll Durations', 'description' => 'With this option enabled, scrolling up may take longer than down, or conversely.', 'default_value' => false, 'type' => 'boolean', 'input_type' => 'checkbox')
Settings container key for scroll duration asymmetricity
FOOTNOTES_SCROLL_OFFSET  = array('key' => 'footnotes_inputfield_scroll_offset', 'name' => 'Scroll Offset', 'description' => 'per cent viewport height from the upper edge', 'default_value' => 20, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 100, 'input_min' => 0)
Settings container key for scroll offset.
FOOTNOTES_SCROLL_UP_DELAY  = array('key' => 'footnotes_inputfield_scroll_up_delay', 'name' => 'Scroll-up Delay', 'description' => 'milliseconds. Less useful than the scroll-down delay.', 'default_value' => 0, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 20000, 'input_min' => 0)
Settings container key for scroll-up delay.
GROUP_ID  = 'scrolling'
Setting group ID.
GROUP_NAME  = 'Scrolling Behavior'
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_CSS_SMOOTH_SCROLLING

Settings container key to enable CSS smooth scrolling.

public array<string|int, mixed> FOOTNOTES_CSS_SMOOTH_SCROLLING = array('key' => 'footnotes_inputfield_css_smooth_scrolling', 'name' => 'CSS-based Smooth Scrolling', 'description' => 'May slightly disturb jQuery scrolling and is therefore disabled by default. Works in recent browsers.', 'default_value' => false, 'type' => 'boolean', 'input_type' => 'checkbox')

Native smooth scrolling only works in recent browsers.

Tags
since
2.5.12
since
2.8.0

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

FOOTNOTES_SCROLL_DOWN_DELAY

Settings container key for scroll-down delay.

public array<string|int, mixed> FOOTNOTES_SCROLL_DOWN_DELAY = array('key' => 'footnotes_inputfield_scroll_down_delay', 'name' => 'Scroll-down Delay', 'description' => 'milliseconds. Useful to see the effect on input elements when referrers without hard links are clicked in form labels.', 'default_value' => 0, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 20000, 'input_min' => 0)
Tags
since
2.5.11
since
2.8.0

Move from Settings to ScrollingSettingsGroup. Convert from int to array.

FOOTNOTES_SCROLL_DOWN_DURATION

Settings container key for scroll duration.

public array<string|int, mixed> FOOTNOTES_SCROLL_DOWN_DURATION = array('key' => 'footnotes_inputfield_scroll_down_duration', 'name' => 'Scroll-down Duration', 'description' => 'milliseconds', 'default_value' => 150, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 20000, 'input_min' => 0, 'enabled_by' => self::FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY)
Tags
since
2.1.11
since
2.8.0

Move from Settings to ScrollingSettingsGroup. Convert from int to array.

FOOTNOTES_SCROLL_DURATION

Settings container key for scroll duration.

public array<string|int, mixed> FOOTNOTES_SCROLL_DURATION = array('key' => 'footnotes_inputfield_scroll_duration', 'name' => 'Scroll Duration', 'description' => 'milliseconds. If asymmetric scroll durations are enabled, this is the scroll-up duration.', 'default_value' => 380, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 20000, 'input_min' => 0)
Tags
since
2.1.4
since
2.8.0

Move from Settings to ScrollingSettingsGroup. Convert from int to array.

FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY

Settings container key for scroll duration asymmetricity

public array<string|int, mixed> FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY = array('key' => 'footnotes_inputfield_scroll_duration_asymmetricity', 'name' => 'Enable Asymmetric Scroll Durations', 'description' => 'With this option enabled, scrolling up may take longer than down, or conversely.', 'default_value' => false, 'type' => 'boolean', 'input_type' => 'checkbox')
Tags
since
2.5.11
since
2.8.0

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

FOOTNOTES_SCROLL_OFFSET

Settings container key for scroll offset.

public array<string|int, mixed> FOOTNOTES_SCROLL_OFFSET = array('key' => 'footnotes_inputfield_scroll_offset', 'name' => 'Scroll Offset', 'description' => 'per cent viewport height from the upper edge', 'default_value' => 20, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 100, 'input_min' => 0)
Tags
since
2.1.4
since
2.8.0

Move from Settings to ScrollingSettingsGroup. Convert from int to array.

FOOTNOTES_SCROLL_UP_DELAY

Settings container key for scroll-up delay.

public array<string|int, mixed> FOOTNOTES_SCROLL_UP_DELAY = array('key' => 'footnotes_inputfield_scroll_up_delay', 'name' => 'Scroll-up Delay', 'description' => 'milliseconds. Less useful than the scroll-down delay.', 'default_value' => 0, 'type' => 'integer', 'input_type' => 'number', 'input_max' => 20000, 'input_min' => 0)
Tags
since
2.5.11
since
2.8.0

Move from Settings to ScrollingSettingsGroup. Convert from int 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