ci: improve linting, GitHub Actions workflows (#149)
* release: release 2.7.2 * fix: urgent 2.7.3 release to fix fatal error * chore: remove un-needed setup script * ci: remove steps from pre-push command * chore: remove un-needed PHP-Commitizen config * chore: put image files in correct folders * chore: move GitHub image into `.github/` dir * fix: classic editor button * fix: call correct jQuery Tools file in dev env * docs: replace license with Markdown version * ci: clean up PHP linting commands If anyone has noticed me playing musical filepaths with these commands for a while, it's because I kept getting inconsistent results from the use of double-globs (i.e., `**`). However, I've finally figured out that this is because Composer is running these scripts in its own shell, so the double-glob that works when I run the command manually in my Terminal doesn't work when Composer runs it in its. * chore: lint PHP files * build: update JS linting standards * chore: lint JS file * build: add node-sass * build: add additional stylelint rules * chore: lint stylesheets with new rulesets * refactor: move ESLint settings to `package.json` * chore: move Prettier config to `package.json` It is not yet possible to move `.prettierignore` to `package.json` too, but this appears to be on the horizon; see [this Issue][prettier-issue]. [prettier-issue]: https://github.com/prettier/prettier/issues/3460 * fix: move WPML config into Plugin folder * chore: move Stylelint config into `package.json` * chore: remove unused `.distignore` It can always be re-added at a later date if it becomes useful. * chore: format file * build: add HTML linting * fix: add image alt tag * ci: clean up GitHub Actions workflows * fix: fix workflow * fix: fix indentation * ci: add YAML validation * chore: make valid * ci: add YAML validation * chore: lint code * ci: change dep install back to original * chore: lint license
This commit is contained in:
parent
ac819034e5
commit
4af8849eec
35 changed files with 15881 additions and 1771 deletions
|
@ -495,7 +495,9 @@ abstract class Footnotes_Layout_Engine {
|
|||
'<option value="%s" %s>%s</option>',
|
||||
$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
|
||||
);
|
||||
}
|
||||
|
|
|
@ -523,34 +523,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' ),
|
||||
|
||||
)
|
||||
);
|
||||
|
@ -677,9 +677,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.
|
||||
|
|
|
@ -246,7 +246,7 @@ class Footnotes {
|
|||
*/
|
||||
wp_enqueue_script(
|
||||
'mci-footnotes-jquery-tools',
|
||||
plugins_url( 'footnotes/js/jquery.tools.min.js' ),
|
||||
plugins_url( 'footnotes/js/jquery.tools' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js' ),
|
||||
array(),
|
||||
'1.2.7.redacted.2',
|
||||
false
|
||||
|
@ -390,7 +390,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(
|
||||
|
|
|
@ -943,7 +943,7 @@ class Footnotes_Task {
|
|||
* Alternative tooltips.
|
||||
*
|
||||
* To streamline internal CSS, immutable rules are in external stylesheet.
|
||||
*
|
||||
*
|
||||
* @see dev-tooltips-alternative.css.
|
||||
*/
|
||||
} else {
|
||||
|
@ -1280,7 +1280,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,
|
||||
|
@ -2409,7 +2409,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.
|
||||
|
|
|
@ -74,7 +74,7 @@ class Footnotes_WYSIWYG {
|
|||
* @return array
|
||||
*/
|
||||
public static function include_scripts( $p_arr_plugins ) {
|
||||
$p_arr_plugins[ Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js', __FILE__ );
|
||||
$p_arr_plugins[ Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( 'js/wysiwyg-editor' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js', dirname( __FILE__ ) );
|
||||
return $p_arr_plugins;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,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 ),
|
||||
|
|
|
@ -57,8 +57,8 @@ span.footnote_referrer:hover > span.footnote_tooltip {
|
|||
}
|
||||
|
||||
.footnote_tooltip.position {
|
||||
display: unset;
|
||||
position: absolute;
|
||||
display: unset;
|
||||
|
||||
/*
|
||||
bottom: 24px;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 >
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,11 @@
|
|||
* Edit: be careful to maintain version number near EOF
|
||||
*/
|
||||
|
||||
/*eslint-disable no-undef */
|
||||
(function () {
|
||||
tinymce.create('tinymce.plugins.Footnotes', {
|
||||
/*eslint-enable no-undef */
|
||||
/*eslint-disable jsdoc/no-undefined-types */
|
||||
/**
|
||||
* Initializes the plugin, this will be executed after the plugin has been created.
|
||||
* This call is done before the editor instance has finished its initialization so use the onInit event
|
||||
|
@ -14,7 +17,8 @@
|
|||
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
||||
* @param {string} url Absolute URL to where the plugin is located.
|
||||
*/
|
||||
init: function (ed, url) {
|
||||
init: (ed, url) => {
|
||||
/*eslint-enable jsdoc/no-undefined-types */
|
||||
ed.addButton('footnotes', {
|
||||
title: 'footnotes',
|
||||
cmd: 'footnotes',
|
||||
|
@ -28,43 +32,33 @@
|
|||
data: {
|
||||
action: 'footnotes_getTags',
|
||||
},
|
||||
success: function (data, textStatus, XMLHttpRequest) {
|
||||
var tags = JSON.parse(data);
|
||||
var returnText = tags.start + ed.selection.getContent() + tags.end;
|
||||
ed.execCommand('insertHTML', true, returnText);
|
||||
success: (data) => {
|
||||
const tags = JSON.parse(data);
|
||||
const returnText = tags.start + ed.selection.getContent() + tags.end;
|
||||
ed.insertContent(returnText);
|
||||
},
|
||||
error: function (MLHttpRequest, textStatus, errorThrown) {
|
||||
console.log('Error: ' + errorThrown);
|
||||
/*eslint-disable no-unused-vars */
|
||||
error: (XMLHttpRequest, textStatus, errorThrown) => {
|
||||
/*eslint-enable no-unused-vars */
|
||||
/*eslint-disable no-console */
|
||||
console.error('Error: ' + errorThrown);
|
||||
/*eslint-enable no-console */
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates control instances based on the incoming name. This method is normally not
|
||||
* needed since the addButton method of the tinymce.Editor class is an easier way of adding buttons,
|
||||
* but you sometimes need to create more complex controls like listboxes, split buttons etc then this
|
||||
* method can be used to create those.
|
||||
*
|
||||
* @param {String} n Name of the control to create.
|
||||
* @param {tinymce.ControlManager} cm Control manager to use in order to create new control.
|
||||
* @return {tinymce.ui.Control} New control instance or null if no control was created.
|
||||
*/
|
||||
createControl: function (n, cm) {
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns information about the plugin as a name/value array.
|
||||
* The current keys are longname, author, authorurl, infourl and version.
|
||||
*
|
||||
* @return {Object} Name/value array containing information about the plugin.
|
||||
* @return {Object} Information about the Plugin.
|
||||
*
|
||||
* Edit: needs updating the version number manually
|
||||
*/
|
||||
getInfo: function () {
|
||||
getInfo: () => {
|
||||
return {
|
||||
longname: 'Inserts the Footnotes short code.',
|
||||
longname: 'footnotes',
|
||||
author: 'Mark Cheret',
|
||||
authorurl: 'https://cheret.org/footnotes/',
|
||||
infourl: 'https://wordpress.org/plugins/footnotes/',
|
||||
|
@ -73,6 +67,8 @@
|
|||
},
|
||||
});
|
||||
|
||||
/*eslint-disable no-undef */
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('footnotes', tinymce.plugins.Footnotes);
|
||||
/*eslint-enable no-undef */
|
||||
})();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="plugin-card">
|
||||
<div class="plugin-card-top">
|
||||
<a href="[[server]]/wp-admin/plugin-install.php?tab=plugin-information&plugin=[[plugin-name]]&TB_iframe=true&width=600&height=550" class="thickbox plugin-icon">
|
||||
<img src="[[plugin-icon]]"/>
|
||||
<img src="[[plugin-icon]]" alt="footnotes Plugin logo" />
|
||||
</a>
|
||||
<div class="name column-name">
|
||||
<h4>
|
||||
|
|
7
src/wpml-config.xml
Normal file
7
src/wpml-config.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<wpml-config>
|
||||
<admin-texts>
|
||||
<key name="footnotes_storage">
|
||||
<key name="footnote_inputfield_references_label" />
|
||||
</key>
|
||||
</admin-texts>
|
||||
</wpml-config>
|
Reference in a new issue