From 9926a42e8ca4537f8f9e83953cedecfc3de03416 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Fri, 16 Apr 2021 01:23:33 +0100 Subject: [PATCH] style: lint code --- class/settings.php | 64 +++++++++++++++++++++++----------------------- class/task.php | 12 ++++----- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/class/settings.php b/class/settings.php index 3b05d0c..a54ff03 100644 --- a/class/settings.php +++ b/class/settings.php @@ -1275,45 +1275,45 @@ class MCI_Footnotes_Settings { self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', // Reference container. - 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_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery', - self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end', - self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]', - self::C_STR_FOOTNOTE_SECTION_SHORTCODE => '[[/footnotesection]]', - self::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', - self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, - self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, - self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', - self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', - self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', - self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', - self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', - self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + 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_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery', + self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end', + self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]', + self::C_STR_FOOTNOTE_SECTION_SHORTCODE => '[[/footnotesection]]', + self::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', - self::C_STR_BACKLINKS_SEPARATOR_ENABLED => 'yes', - self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', - self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', + 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_OPTION => 'full_stop', - self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + self::C_STR_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', + self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', - self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', - self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', - self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', - self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', - self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', - self::C_STR_LINK_ELEMENT_ENABLED => 'yes', + self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + self::C_STR_LINK_ELEMENT_ENABLED => 'yes', // Footnotes in excerpts. - self::C_STR_FOOTNOTES_IN_EXCERPT => 'manual', + self::C_STR_FOOTNOTES_IN_EXCERPT => 'manual', // Footnotes love. self::C_STR_FOOTNOTES_LOVE => 'no', diff --git a/class/task.php b/class/task.php index becc14b..db61494 100644 --- a/class/task.php +++ b/class/task.php @@ -1097,8 +1097,8 @@ class MCI_Footnotes_Task { */ public function footnotes_in_content( $p_str_content ) { - $l_str_ref_container_position = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ); - $l_str_footnote_section_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SECTION_SHORTCODE ); + $l_str_ref_container_position = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ); + $l_str_footnote_section_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SECTION_SHORTCODE ); $l_int_footnote_section_shortcode_length = strlen( $l_str_footnote_section_shortcode ); if ( strpos( $p_str_content, $l_str_footnote_section_shortcode ) === false ) { @@ -1110,14 +1110,14 @@ class MCI_Footnotes_Task { } else { - $l_str_rest_content = $p_str_content; - $l_arr_sections_raw = array(); + $l_str_rest_content = $p_str_content; + $l_arr_sections_raw = array(); $l_arr_sections_processed = array(); do { - $l_int_section_end = strpos( $l_str_rest_content, $l_str_footnote_section_shortcode ); + $l_int_section_end = strpos( $l_str_rest_content, $l_str_footnote_section_shortcode ); $l_arr_sections_raw[] = substr( $l_str_rest_content, 0, $l_int_section_end ); - $l_str_rest_content = substr( $l_str_rest_content, $l_int_section_end + $l_int_footnote_section_shortcode_length ); + $l_str_rest_content = substr( $l_str_rest_content, $l_int_section_end + $l_int_footnote_section_shortcode_length ); } while ( strpos( $l_str_rest_content, $l_str_footnote_section_shortcode ) !== false ); $l_arr_sections_raw[] = $l_str_rest_content;