Documentation

TooltipPositionSettingsGroup extends SettingsGroup
in package

Class defining the tooltip position settings.

Tags
since
2.8.0

Table of Contents

FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X  = array('key' => 'footnotes_inputfield_alternative_mouse_over_box_offset_x', 'name' => 'Horizontal Offset (alternative tooltips)', 'description' => 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'default_value' => -50, 'type' => 'number', 'input_type' => 'number')
Settings container key for alternative tooltip _x_-offset.
FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y  = array('key' => 'footnotes_inputfield_alternative_mouse_over_box_offset_y', 'name' => 'Vertical Offset (alternative tooltips)', 'description' => 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'default_value' => 24, 'type' => 'number', 'input_type' => 'number')
Settings container key for alternative tooltip _y_-offset.
FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION  = array('key' => 'footnotes_inputfield_alternative_mouse_over_box_position', 'name' => 'Position (alternative Tooltips)', 'default_value' => 'top right', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('top left' => 'top left', 'top right' => 'top right', 'bottom right' => 'bottom right', 'bottom left' => 'bottom left'))
Settings container key for alternative tooltip position.
FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X  = array('key' => 'footnote_inputfield_custom_mouse_over_box_offset_x', 'name' => 'Horizontal Offset', 'description' => 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'default_value' => 0, 'type' => 'number', 'input_type' => 'number')
Settings container key for the mouse-over box to define the _x_-offset.
FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y  = array('key' => 'footnote_inputfield_custom_mouse_over_box_offset_y', 'name' => 'Vertical Offset', 'description' => 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'default_value' => -7, 'type' => 'number', 'input_type' => 'number')
Settings container key for the mouse-over box to define the _y_-offset.
FOOTNOTES_MOUSE_OVER_BOX_POSITION  = array('key' => 'footnote_inputfield_custom_mouse_over_box_position', 'name' => 'Position', 'description' => 'The second column of settings boxes is for the alternative tooltips.', 'default_value' => 'top center', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('top left' => 'top left', 'top center' => 'top center', 'top right' => 'top right', 'center right' => 'center right', 'bottom right' => 'bottom right', 'bottom center' => 'bottom center', 'bottom left' => 'bottom left', 'center left' => 'center left'))
Settings container key for the mouse-over box to define the position.
GROUP_ID  = 'tooltip-position'
Setting group ID.
GROUP_NAME  = 'Tooltip Position'
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

FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X

Settings container key for alternative tooltip _x_-offset.

public array<string|int, mixed> FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X = array('key' => 'footnotes_inputfield_alternative_mouse_over_box_offset_x', 'name' => 'Horizontal Offset (alternative tooltips)', 'description' => 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'default_value' => -50, 'type' => 'number', 'input_type' => 'number')
Tags
since
2.2.5
since
2.8.0

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

FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y

Settings container key for alternative tooltip _y_-offset.

public array<string|int, mixed> FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y = array('key' => 'footnotes_inputfield_alternative_mouse_over_box_offset_y', 'name' => 'Vertical Offset (alternative tooltips)', 'description' => 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'default_value' => 24, 'type' => 'number', 'input_type' => 'number')
Tags
since
2.5.5
since
2.8.0

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

FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION

Settings container key for alternative tooltip position.

public array<string|int, mixed> FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION = array('key' => 'footnotes_inputfield_alternative_mouse_over_box_position', 'name' => 'Position (alternative Tooltips)', 'default_value' => 'top right', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('top left' => 'top left', 'top right' => 'top right', 'bottom right' => 'bottom right', 'bottom left' => 'bottom left'))

Fixed-width is for alternative tooltips, cannot reuse max-width nor offsets.

Tags
since
2.2.5
since
2.8.0

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

FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X

Settings container key for the mouse-over box to define the _x_-offset.

public array<string|int, mixed> FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X = array('key' => 'footnote_inputfield_custom_mouse_over_box_offset_x', 'name' => 'Horizontal Offset', 'description' => 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'default_value' => 0, 'type' => 'number', 'input_type' => 'number')
Tags
since
1.5.7
since
2.8.0

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

FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y

Settings container key for the mouse-over box to define the _y_-offset.

public array<string|int, mixed> FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y = array('key' => 'footnote_inputfield_custom_mouse_over_box_offset_y', 'name' => 'Vertical Offset', 'description' => 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'default_value' => -7, 'type' => 'number', 'input_type' => 'number')

The vertical offset must be negative for the box not to cover the current line of text.

Tags
since
1.5.7
since
2.8.0

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

FOOTNOTES_MOUSE_OVER_BOX_POSITION

Settings container key for the mouse-over box to define the position.

public array<string|int, mixed> FOOTNOTES_MOUSE_OVER_BOX_POSITION = array('key' => 'footnote_inputfield_custom_mouse_over_box_position', 'name' => 'Position', 'description' => 'The second column of settings boxes is for the alternative tooltips.', 'default_value' => 'top center', 'type' => 'string', 'input_type' => 'select', 'input_options' => array('top left' => 'top left', 'top center' => 'top center', 'top right' => 'top right', 'center right' => 'center right', 'bottom right' => 'bottom right', 'bottom center' => 'bottom center', 'bottom left' => 'bottom left', 'center left' => 'center left'))

The default position should not be lateral because of the risk the box gets squeezed between note anchor at line end and window edge, and top because reading at the bottom of the window is more likely.

Tags
since
1.5.7
since
2.8.0

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