style: lint code

This commit is contained in:
Ben Goldsworthy 2021-04-16 01:23:33 +01:00
parent 43a5de6cef
commit 9926a42e8c
2 changed files with 38 additions and 38 deletions

View file

@ -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',

View file

@ -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;