'footnote_inputfield_custom_mouse_over_box_excerpt_enabled', 'name' => 'Truncate the Note in the Tooltip', 'default_value' => true, 'type' => 'boolean', 'input_type' => 'checkbox', ); /** * Settings container key for the mouse-over box to define the max. length of * the enabled excerpt. * * The default truncation length is 200 chars. * * @var array * * @since 1.5.4 * @since 2.8.0 Move from `Settings` to `ReferenceContainerSettingsGroup`. * Convert from `string` to `array`. */ const FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = array( 'key' => 'footnote_inputfield_custom_mouse_over_box_excerpt_length', 'name' => 'Maximum Number of Characters in the Tooltip', 'description' => 'No weird cuts.', 'default_value' => 200, 'type' => 'number', 'input_type' => 'number', 'input_max' => 10000, 'input_min' => 3, ); /** * Settings container key for the label of the Read-on button in truncated tooltips. * * @var array * * @since 2.1.0 * @since 2.8.0 Move from `Settings` to `ReferenceContainerSettingsGroup`. * Convert from `string` to `array`. */ const FOOTNOTES_TOOLTIP_READON_LABEL = array( 'key' => 'footnote_inputfield_readon_label', 'name' => '\'Read on\' Button Label', 'default_value' => 'Continue reading', 'type' => 'string', 'input_type' => 'text', ); protected function add_settings( array|false $options ): void { $this->settings = array( self::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED['key'] => $this->add_setting( self::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED ), self::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH['key'] => $this->add_setting( self::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH ), self::FOOTNOTES_TOOLTIP_READON_LABEL['key'] => $this->add_setting( self::FOOTNOTES_TOOLTIP_READON_LABEL ), ); $this->load_values( $options ); } }