From 526b5d096f7113984453246d6aabbf9ada6a381b Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:59:52 +0000 Subject: [PATCH] Minor whitespace, commenting tweaks --- class/init.php | 1 + class/settings.php | 54 +++++++++++++++++++++++----------------------- class/task.php | 4 +--- class/template.php | 12 +++++------ 4 files changed, 35 insertions(+), 36 deletions(-) diff --git a/class/init.php b/class/init.php index 51b3bc1..7d84c99 100644 --- a/class/init.php +++ b/class/init.php @@ -209,6 +209,7 @@ class MCI_Footnotes { * see full header in js/jquery.tools.js. * * Add versioning. + * * @since 2.1.2 * @date 2020-11-18T2150+0100 * diff --git a/class/settings.php b/class/settings.php index 593302e..2dd59ba 100644 --- a/class/settings.php +++ b/class/settings.php @@ -533,26 +533,26 @@ class MCI_Footnotes_Settings { // Backlink typography. const C_STR_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled'; - const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option'; - const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom'; + const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option'; + const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom'; const C_STR_BACKLINKS_TERMINATOR_ENABLED = 'footnotes_inputfield_backlinks_terminator_enabled'; - const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option'; - const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom'; + const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option'; + const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom'; // Backlink layout. const C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled'; - const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar'; - const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit'; + const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar'; + const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit'; const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_max_width_enabled'; - const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar'; - const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit'; + const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar'; + const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit'; const C_STR_BACKLINKS_LINE_BREAKS_ENABLED = 'footnotes_inputfield_backlinks_line_breaks_enabled'; // Tooltip font size. // Called mouse over box not tooltip for consistency. const C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED = 'footnotes_inputfield_mouse_over_box_font_size_enabled'; - const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar'; - const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit'; + const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar'; + const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit'; // Page layout support. const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = 'footnotes_inputfield_page_layout_support'; @@ -617,7 +617,7 @@ class MCI_Footnotes_Settings { const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y = 'footnotes_inputfield_alternative_mouse_over_box_offset_y'; const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH = 'footnotes_inputfield_alternative_mouse_over_box_width'; - const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element'; + const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element'; const C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = 'footnotes_inputfield_reference_container_label_bottom_border'; /** @@ -644,7 +644,7 @@ class MCI_Footnotes_Settings { */ const C_INT_REFERENCE_CONTAINER_TOP_MARGIN = 'footnotes_inputfield_reference_container_top_margin'; const C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN = 'footnotes_inputfield_reference_container_bottom_margin'; - const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable'; + const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable'; const C_STR_REFERRER_FRAGMENT_ID_SLUG = 'footnotes_inputfield_referrer_fragment_id_slug'; const C_STR_FOOTNOTE_FRAGMENT_ID_SLUG = 'footnotes_inputfield_footnote_fragment_id_slug'; const C_STR_HARD_LINK_IDS_SEPARATOR = 'footnotes_inputfield_hard_link_ids_separator'; @@ -818,9 +818,9 @@ class MCI_Footnotes_Settings { self::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - self::C_STR_FOOTNOTES_HARD_LINKS_ENABLE => 'no', + self::C_STR_FOOTNOTES_HARD_LINKS_ENABLE => 'no', self::C_STR_REFERRER_FRAGMENT_ID_SLUG => 'r', self::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG => 'f', self::C_STR_HARD_LINK_IDS_SEPARATOR => '+', @@ -828,14 +828,14 @@ class MCI_Footnotes_Settings { self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, // 2.5.4 fast-tracked. - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', self::C_STR_REFERENCE_CONTAINER_NAME => 'References', self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', self::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', - self::C_STR_REFERENCE_CONTAINER_COLLAPSE => 'no', + self::C_STR_REFERENCE_CONTAINER_COLLAPSE => 'no', self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery', self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end', @@ -859,15 +859,15 @@ class MCI_Footnotes_Settings { // Backlink separators and terminators are often not preferred.. // But a choice must be provided along with the ability to customize. - self::C_STR_BACKLINKS_SEPARATOR_ENABLED => 'yes', + self::C_STR_BACKLINKS_SEPARATOR_ENABLED => 'yes', self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', - self::C_STR_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_ENABLED => 'no', self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', // Set backlinks column width. - self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', @@ -877,18 +877,18 @@ class MCI_Footnotes_Settings { self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', // Whether a
tag is inserted. - self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', // Whether to enable URL line wrapping. - self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', // Whether to use link elements. - self::C_STR_LINK_ELEMENT_ENABLED => 'yes', + self::C_STR_LINK_ELEMENT_ENABLED => 'yes', // Excerpt should be disabled. - self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', + self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', - self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', self::C_STR_FOOTNOTES_LOVE => 'no', @@ -906,7 +906,7 @@ class MCI_Footnotes_Settings { self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', @@ -954,7 +954,7 @@ class MCI_Footnotes_Settings { // Tooltip font size reset to legacy by default since 2.1.4;. // Was set to inherit since 2.1.1 as it overrode custom CSS,. // Is moved to settings since 2.1.4 2020-12-04T1023+0100. - self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', @@ -1024,7 +1024,7 @@ class MCI_Footnotes_Settings { 'footnotes_storage_custom_css' => array( self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', + self::C_STR_CUSTOM_CSS_NEW => '', ), diff --git a/class/task.php b/class/task.php index 7fc22f1..d24c403 100644 --- a/class/task.php +++ b/class/task.php @@ -908,7 +908,6 @@ class MCI_Footnotes_Task { * @date 2020-12-18T1113+0100 */ if ( ! self::$a_bool_alternative_tooltips_enabled ) { - /* * jQuery tooltips. */ @@ -919,7 +918,6 @@ class MCI_Footnotes_Task { echo "}\r\n"; } else { - /* * Alternative tooltips. */ @@ -954,7 +952,7 @@ class MCI_Footnotes_Task { /** * Alternative tooltip timing. * - * jQuery tooltip timing @see templates/public/tooltip.html. + * For jQuery tooltip timing @see templates/public/tooltip.html. */ echo ' .footnote_tooltip.shown {'; $l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) ); diff --git a/class/template.php b/class/template.php index 4a6bff1..3a81216 100644 --- a/class/template.php +++ b/class/template.php @@ -7,7 +7,7 @@ * @since 1.5.0 14.09.14 10:58 * * @lastmodified 2021-02-22T1416+0100 - * + * * @since 2.2.6 Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. * @since 2.5.0 Adding: Templates: Enable template location stack, thanks to @misfist code contribution. */ @@ -68,12 +68,12 @@ class MCI_Footnotes_Template { * @param string $p_str_file_type Template file type (take a look on the Class constants). * @param string $p_str_file_name Template file name inside the Template directory without the file extension. * @param string $p_str_extension Optional Template file extension (default: html). - * + * * - Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. - * + * * @since 2.2.6 * @date 2020-12-19T0606+0100 - * + * * @reporter @misfist * @link https://wordpress.org/support/topic/template-override-filter/ */ @@ -176,12 +176,12 @@ class MCI_Footnotes_Template { /** * Get the template. - * + * * - Adding: Templates: Enable template location stack, thanks to @misfist code contribution. * * @since 2.4.0d3 Contribution. * @since 2.5.0 Release. - * + * * @contributor @misfist * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 *