-
+
diff --git a/src/css/dev-amp-tooltips.css b/src/css/dev-amp-tooltips.css
index baaabd4..c48fe3d 100644
--- a/src/css/dev-amp-tooltips.css
+++ b/src/css/dev-amp-tooltips.css
@@ -57,8 +57,8 @@ span.footnote_referrer:hover > span.footnote_tooltip {
}
.footnote_tooltip.position {
- display: unset;
position: absolute;
+ display: unset;
/*
bottom: 24px;
diff --git a/src/css/dev-common.css b/src/css/dev-common.css
index daf14ed..ca8db05 100644
--- a/src/css/dev-common.css
+++ b/src/css/dev-common.css
@@ -77,16 +77,16 @@
*/
.footnotes_validation_error {
- border: 4px solid red;
- padding: 20px 40px;
margin: 20px 0;
- background: #f005;
+ padding: 20px 40px;
text-align: start;
+ background: #f005;
+ border: 4px solid red;
}
.footnotes_validation_error p:first-child {
- font-size: 20px;
font-weight: bold;
+ font-size: 20px;
text-align: center;
}
@@ -96,8 +96,8 @@
}
.footnotes_validation_error p:nth-child(3) {
- font-size: 14px;
font-weight: bold;
+ font-size: 14px;
}
.footnotes_validation_error p:last-child {
@@ -140,8 +140,8 @@
.footnote_url_wrap {
word-wrap: anywhere;
- overflow-wrap: anywhere;
word-break: break-all;
+ overflow-wrap: anywhere;
}
/**
@@ -205,7 +205,23 @@
.main-content .footnote_referrer > a:link,
.main-content .footnote_referrer > a:hover,
.main-content .footnote_plugin_tooltip_text,
-.main-content .footnote_plugin_tooltip_text:hover {
+.main-content .footnote_plugin_tooltip_text:hover,
+.footnote_referrer,
+.footnote_referrer:link,
+.footnote_referrer:focus,
+.footnote_referrer > a,
+.footnote_referrer > a:link,
+.footnote_referrer > a:focus,
+.footnote_plugin_tooltip_text,
+.footnote_plugin_tooltip_text:focus,
+.main-content .footnote_referrer,
+.main-content .footnote_referrer:link,
+.main-content .footnote_referrer:focus,
+.main-content .footnote_referrer > a,
+.main-content .footnote_referrer > a:link,
+.main-content .footnote_referrer > a:focus,
+.main-content .footnote_plugin_tooltip_text,
+.main-content .footnote_plugin_tooltip_text:focus {
text-decoration: none !important;
border-bottom: none !important;
box-shadow: none !important;
@@ -230,8 +246,8 @@
*/
.footnote_plugin_tooltip_text {
- line-height: 0;
position: relative !important;
+ line-height: 0;
cursor: pointer;
}
@@ -298,26 +314,26 @@ Classes:
}
.footnote_container_prepare > p {
- line-height: 1.3 !important;
+
+ /* bottom border optional since 2.2.5 */
+ display: block !important;
margin-top: 1em !important;
margin-bottom: 0.25em !important;
padding: 0 !important;
font-weight: normal !important;
-
- /* bottom border optional since 2.2.5 */
- display: block !important;
+ line-height: 1.3 !important;
+ text-align: start !important;
+ vertical-align: middle;
-webkit-margin-before: 0.83em !important;
-webkit-margin-after: 0.83em !important;
-webkit-margin-start: 0 !important;
-webkit-margin-end: 0 !important;
- text-align: start !important;
- vertical-align: middle;
}
.footnote_container_prepare > p > span:first-child,
.footnote_container_prepare > p > span:nth-child(3) {
- text-align: start !important;
font-size: 1.5em !important;
+ text-align: start !important;
}
/*
@@ -326,11 +342,11 @@ fully clickable, not sign only
*/
.footnote_reference_container_collapse_button {
- cursor: pointer;
padding: 0 0.5em;
font-size: 1.3em !important;
- vertical-align: 2px;
text-decoration: none !important;
+ vertical-align: 2px;
+ cursor: pointer;
}
h2 > .footnote_reference_container_collapse_button,
@@ -371,13 +387,13 @@ table
*/
.footnotes_table caption.accessibility {
- text-align: start;
- margin-top: -2px !important;
- height: 1px !important;
width: 1px !important;
- white-space: nowrap !important;
+ height: 1px !important;
+ margin-top: -2px !important;
overflow: hidden !important;
color: #fff0 !important;
+ white-space: nowrap !important;
+ text-align: start;
background-color: #fff0 !important;
}
@@ -429,10 +445,10 @@ table
.footnote_plugin_index_combi,
.footnote_plugin_symbol,
.footnote_plugin_text {
- border: none !important;
+ padding: 5px 6px 10px 0 !important;
text-align: start !important;
vertical-align: top !important;
- padding: 5px 6px 10px 0 !important;
+ border: none !important;
}
html[dir="rtl"] .footnote_plugin_index,
@@ -476,7 +492,10 @@ when hovered in some themes, not in others:
.footnote_backlink:hover,
.footnote_plugin_link:hover,
-.footnote_plugin_text a:hover {
+.footnote_plugin_text a:hover,
+.footnote_backlink:focus,
+.footnote_plugin_link:focus,
+.footnote_plugin_text a:focus {
text-decoration: unset;
text-decoration: underline; /*deprioritized to ease customization*/
}
@@ -497,8 +516,8 @@ These are overridden if settings are enabled.
.footnote_plugin_index,
.footnote_plugin_index_combi {
- max-width: 100px;
width: 2.5em;
+ max-width: 100px;
}
/*
@@ -574,9 +593,11 @@ Link color set to inherit, so referrers/numbers are not grayed out.
*/
.footnotes_logo,
-.footnotes_logo:hover {
- text-decoration: none;
+.footnotes_logo:hover,
+.footnotes_logo,
+.footnotes_logo:focus {
font-weight: normal;
+ text-decoration: none;
}
.footnotes_logo_part1 {
diff --git a/src/css/dev-layout-entry-content.css b/src/css/dev-layout-entry-content.css
index 491b025..c32066b 100644
--- a/src/css/dev-layout-entry-content.css
+++ b/src/css/dev-layout-entry-content.css
@@ -9,9 +9,9 @@
*
* Since v2.1.4 of Footnotes
*
- * Modified for 2.2.2
- * Modified for 2.2.5
- * Modified for 2.3.0
+ * Modified for 2.2.2
+ * Modified for 2.2.5
+ * Modified for 2.3.0
*
* The enqueuing of this stylesheet is optional and can be
* enabled in the dashboard under General settings >
diff --git a/src/css/dev-layout-main-content.css b/src/css/dev-layout-main-content.css
index f3498b4..9d1e7e9 100644
--- a/src/css/dev-layout-main-content.css
+++ b/src/css/dev-layout-main-content.css
@@ -9,7 +9,7 @@
*
* Since v2.1.4 of Footnotes
*
- * Last modified for v2.2.4
+ * Last modified for v2.2.4
*
* The enqueuing of this stylesheet is optional and can be
* enabled in the Reference container settings.
diff --git a/src/css/dev-layout-reference-container.css b/src/css/dev-layout-reference-container.css
index 8768559..1e946e6 100644
--- a/src/css/dev-layout-reference-container.css
+++ b/src/css/dev-layout-reference-container.css
@@ -9,7 +9,7 @@
*
* Since v2.1.4 of Footnotes
*
- * Last modified for v2.2.4
+ * Last modified for v2.2.4
*
* The enqueuing of this stylesheet is optional and can be
* enabled in the Reference container settings.
diff --git a/src/css/dev-tooltips-alternative.css b/src/css/dev-tooltips-alternative.css
index 0e906c0..e5c0b69 100644
--- a/src/css/dev-tooltips-alternative.css
+++ b/src/css/dev-tooltips-alternative.css
@@ -21,8 +21,8 @@
}
.footnote_tooltip.position {
- display: unset;
position: absolute;
+ display: unset;
/*
bottom: 24px;
@@ -42,8 +42,8 @@
.footnote_tooltip.shown {
visibility: visible;
opacity: 1;
- transition-property: visibility, opacity;
transition-timing-function: linear;
+ transition-property: visibility, opacity;
/*
transition-delay: 0ms;
@@ -54,8 +54,8 @@
.footnote_tooltip.hidden {
visibility: hidden;
opacity: 0;
- transition-property: visibility, opacity;
transition-timing-function: linear;
+ transition-property: visibility, opacity;
/*
transition-delay: 400ms;
diff --git a/src/css/dev-tooltips.css b/src/css/dev-tooltips.css
index e625ec5..2ff9e5c 100644
--- a/src/css/dev-tooltips.css
+++ b/src/css/dev-tooltips.css
@@ -25,14 +25,14 @@
*/
.footnote_tooltip {
- display: none;
z-index: 2147483647 !important;
- cursor: auto;
- text-align: start !important;
+ display: none;
padding: 12px !important;
- line-height: 1.2;
font-weight: normal;
font-style: normal;
+ line-height: 1.2;
+ text-align: start !important;
+ cursor: auto;
}
/*
@@ -40,14 +40,15 @@ Read-on button
*/
.footnote_tooltip_continue {
- font-style: italic;
color: green;
+ font-style: italic;
+ white-space: nowrap;
text-decoration: none !important;
cursor: pointer;
- white-space: nowrap;
}
-.footnote_tooltip_continue:hover {
+.footnote_tooltip_continue:hover,
+.footnote_tooltip_continue:focus {
color: blue;
text-decoration: underline !important;
}
diff --git a/src/css/settings.css b/src/css/settings.css
index 8afd034..4be768c 100644
--- a/src/css/settings.css
+++ b/src/css/settings.css
@@ -22,11 +22,11 @@
*/
.footnotes_logo_heading {
+ position: absolute;
display: inline-block;
float: left;
- position: absolute;
- text-decoration: none;
font-weight: normal;
+ text-decoration: none;
}
.footnotes_logo_part1_heading {
@@ -40,10 +40,10 @@
}
.footnotes_heart_heading {
- color: #ff6d3b;
- font-weight: bold;
position: absolute;
left: 96px;
+ color: #ff6d3b;
+ font-weight: bold;
}
/**
@@ -67,9 +67,9 @@ Limited to a number of IDs to not affect all dashboards
#footnote_inputfield_readon_label,
#footnote_inputfield_references_label,
#footnote_inputfield_love {
- padding-left: 8px !important;
- padding-right: 8px !important;
width: 80% !important;
+ padding-right: 8px !important;
+ padding-left: 8px !important;
}
#footnote_inputfield_reference_container_place {
@@ -162,18 +162,18 @@ label {
}
span.footnote_highlight_placeholder {
- font-weight: bold !important;
padding: 0 8px !important;
+ font-weight: bold !important;
}
.footnote_placeholder_box_example {
+ display: block !important;
+ width: 50% !important;
+ margin: 20px auto !important;
+ padding: 16px 0 !important;
+ text-align: center !important;
border: 2px solid #2bb975 !important;
border-radius: 4px !important;
- padding: 16px 0 !important;
- width: 50% !important;
- display: block !important;
- margin: 20px auto !important;
- text-align: center !important;
}
/************************************************************
@@ -238,10 +238,10 @@ helping edit CSS, like tab support and syntactic colors.
}
.customize_css_new .list p {
- font-family: monospace;
- padding: 0 10px;
- text-indent: -10px;
margin: 0.5em 0;
+ padding: 0 10px;
+ font-family: monospace;
+ text-indent: -10px;
}
#footnote_inputfield_custom_css_new {
@@ -251,9 +251,9 @@ helping edit CSS, like tab support and syntactic colors.
#footnote_inputfield_custom_css,
#footnote_inputfield_custom_css_new {
width: 96%;
- resize: both;
overflow: scroll;
font-family: monospace;
+ resize: both;
}
/************************************************************
@@ -273,8 +273,8 @@ look weird.
since 2.1.4
*/
.footnotes_notice {
- font-style: italic;
display: inline-block;
+ font-style: italic;
text-align: end;
}
diff --git a/src/includes/class-footnotes.php b/src/includes/class-footnotes.php
index d414cc5..89a06fb 100644
--- a/src/includes/class-footnotes.php
+++ b/src/includes/class-footnotes.php
@@ -258,7 +258,11 @@ class Footnotes {
*/
wp_enqueue_script(
'mci-footnotes-jquery-tools',
+<<<<<<< HEAD:src/includes/class-footnotes.php
plugins_url( 'footnotes/public/js/jquery.tools.min.js' ),
+=======
+ plugins_url( 'footnotes/js/jquery.tools' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js' ),
+>>>>>>> linting:src/class/init.php
array(),
'1.2.7.redacted.2',
false
@@ -402,7 +406,7 @@ class Footnotes {
* Enqueues external stylesheets, ONLY in development now.
*
* @since 2.1.4 optionally enqueue an extra stylesheet.
- *
+ *
* This optional layout fix is useful by lack of layout support.
*/
wp_enqueue_style(
diff --git a/src/includes/dashboard/layout.php b/src/includes/dashboard/layout.php
index 8bde0b4..692a9cb 100644
--- a/src/includes/dashboard/layout.php
+++ b/src/includes/dashboard/layout.php
@@ -500,7 +500,9 @@ abstract class Footnotes_Layout_Engine {
'',
$l_str_value,
// Only check for equality, not identity, WRT backlink symbol arrows.
+ // phpcs:disable WordPress.PHP.StrictComparisons.LooseComparison
$l_str_value == $l_arr_data['value'] ? 'selected' : '',
+ // phpcs:enable WordPress.PHP.StrictComparisons.LooseComparison
$l_str_caption
);
}
diff --git a/src/includes/dashboard/subpage-main.php b/src/includes/dashboard/subpage-main.php
index 43b4275..23cb641 100644
--- a/src/includes/dashboard/subpage-main.php
+++ b/src/includes/dashboard/subpage-main.php
@@ -529,34 +529,34 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
$l_obj_template->replace(
array(
- 'label-scroll-css' => $this->add_label( Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, __( 'CSS-based smooth scrolling:', 'footnotes' ) ),
- 'scroll-css' => $this->add_select_box( Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, $l_arr_enable ),
- 'notice-scroll-css' => __( 'May slightly disturb jQuery scrolling and is therefore disabled by default. Works in recent browsers.', 'footnotes' ),
+ 'label-scroll-css' => $this->add_label( Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, __( 'CSS-based smooth scrolling:', 'footnotes' ) ),
+ 'scroll-css' => $this->add_select_box( Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, $l_arr_enable ),
+ 'notice-scroll-css' => __( 'May slightly disturb jQuery scrolling and is therefore disabled by default. Works in recent browsers.', 'footnotes' ),
- 'label-scroll-offset' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ),
- 'scroll-offset' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ),
- 'notice-scroll-offset' => __( 'per cent viewport height from the upper edge', 'footnotes' ),
+ 'label-scroll-offset' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ),
+ 'scroll-offset' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ),
+ 'notice-scroll-offset' => __( 'per cent viewport height from the upper edge', 'footnotes' ),
- 'label-scroll-duration' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ),
- 'scroll-duration' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ),
- 'notice-scroll-duration' => __( 'milliseconds. If asymmetric scroll durations are enabled, this is the scroll-up duration.', 'footnotes' ),
+ 'label-scroll-duration' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ),
+ 'scroll-duration' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ),
+ 'notice-scroll-duration' => __( 'milliseconds. If asymmetric scroll durations are enabled, this is the scroll-up duration.', 'footnotes' ),
// Enable scroll duration asymmetricity.
- 'label-scroll-asymmetricity' => $this->add_label( Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, __( 'Enable asymmetric scroll durations:', 'footnotes' ) ),
- 'scroll-asymmetricity' => $this->add_select_box( Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, $l_arr_enable ),
- 'notice-scroll-asymmetricity' => __( 'With this option enabled, scrolling up may take longer than down, or conversely.', 'footnotes' ),
+ 'label-scroll-asymmetricity' => $this->add_label( Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, __( 'Enable asymmetric scroll durations:', 'footnotes' ) ),
+ 'scroll-asymmetricity' => $this->add_select_box( Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, $l_arr_enable ),
+ 'notice-scroll-asymmetricity' => __( 'With this option enabled, scrolling up may take longer than down, or conversely.', 'footnotes' ),
- 'label-scroll-down-duration' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, __( 'Scroll-down duration:', 'footnotes' ) ),
- 'scroll-down-duration' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, 0, 20000 ),
- 'notice-scroll-down-duration' => __( 'milliseconds', 'footnotes' ),
+ 'label-scroll-down-duration' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, __( 'Scroll-down duration:', 'footnotes' ) ),
+ 'scroll-down-duration' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, 0, 20000 ),
+ 'notice-scroll-down-duration' => __( 'milliseconds', 'footnotes' ),
- 'label-scroll-down-delay' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, __( 'Scroll-down delay:', 'footnotes' ) ),
- 'scroll-down-delay' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, 0, 20000 ),
- 'notice-scroll-down-delay' => __( 'milliseconds. Useful to see the effect on input elements when referrers without hard links are clicked in form labels.', 'footnotes' ),
+ 'label-scroll-down-delay' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, __( 'Scroll-down delay:', 'footnotes' ) ),
+ 'scroll-down-delay' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, 0, 20000 ),
+ 'notice-scroll-down-delay' => __( 'milliseconds. Useful to see the effect on input elements when referrers without hard links are clicked in form labels.', 'footnotes' ),
- 'label-scroll-up-delay' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, __( 'Scroll-up delay:', 'footnotes' ) ),
- 'scroll-up-delay' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, 0, 20000 ),
- 'notice-scroll-up-delay' => __( 'milliseconds. Less useful than the scroll-down delay.', 'footnotes' ),
+ 'label-scroll-up-delay' => $this->add_label( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, __( 'Scroll-up delay:', 'footnotes' ) ),
+ 'scroll-up-delay' => $this->add_num_box( Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, 0, 20000 ),
+ 'notice-scroll-up-delay' => __( 'milliseconds. Less useful than the scroll-down delay.', 'footnotes' ),
)
);
@@ -683,9 +683,9 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function excerpts() {
// Options for options select box.
$l_arr_excerpt_mode = array(
- 'yes' => __( 'Yes, generate excerpts from posts with effectively processed footnotes and other markup', 'footnotes' ),
- 'no' => __( 'No, generate excerpts from posts but remove all footnotes and output plain text', 'footnotes' ),
- 'manual' => __( 'Yes but run the process only to display tooltips in manual excerpts with footnote short codes', 'footnotes' ),
+ 'yes' => __( 'Yes, generate excerpts from posts with effectively processed footnotes and other markup', 'footnotes' ),
+ 'no' => __( 'No, generate excerpts from posts but remove all footnotes and output plain text', 'footnotes' ),
+ 'manual' => __( 'Yes but run the process only to display tooltips in manual excerpts with footnote short codes', 'footnotes' ),
);
// Load template file.
diff --git a/src/includes/task.php b/src/includes/task.php
index fbf4071..9e10d1e 100644
--- a/src/includes/task.php
+++ b/src/includes/task.php
@@ -948,7 +948,7 @@ class Footnotes_Task {
* Alternative tooltips.
*
* To streamline internal CSS, immutable rules are in external stylesheet.
- *
+ *
* @see dev-tooltips-alternative.css.
*/
} else {
@@ -1285,7 +1285,7 @@ class Footnotes_Task {
);
// Prevent the footnotes from altering the excerpt: previously hard-coded '5ED84D6'.
- $l_int_placeholder = '@' . mt_rand( 100000000, 2147483647 ) . '@';
+ $l_int_placeholder = '@' . wp_rand( 100000000, 2147483647 ) . '@';
$p_str_content = preg_replace(
'#' . self::$a_str_start_tag_regex . '.+?' . self::$a_str_end_tag_regex . '#',
$l_int_placeholder,
@@ -2414,7 +2414,7 @@ class Footnotes_Task {
* - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
*
* @since 2.1.1
- */
+ */
$l_bool_combine_identical_footnotes = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) );
// AMP compatibility requires a full set of AMP compatible table row templates.
diff --git a/src/includes/wysiwyg.php b/src/includes/wysiwyg.php
index aade969..7be3623 100644
--- a/src/includes/wysiwyg.php
+++ b/src/includes/wysiwyg.php
@@ -96,7 +96,7 @@ class Footnotes_WYSIWYG {
$l_str_starting_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
$l_str_ending_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
}
- echo json_encode(
+ echo wp_json_encode(
array(
'start' => htmlspecialchars( $l_str_starting_tag ),
'end' => htmlspecialchars( $l_str_ending_tag ),
diff --git a/wpml-config.xml b/src/wpml-config.xml
similarity index 100%
rename from wpml-config.xml
rename to src/wpml-config.xml