Version Description
08/07/2022 = * BUG: The numbering of the titles has disappeared after latest update. #281
Download this release
Release Info
Developer | magazine3 |
Plugin | Easy Table of Contents |
Version | 2.0.33.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.33 to 2.0.33.1
- README.txt +4 -1
- assets/js/admin.js +12 -11
- assets/js/admin.min.js +1 -1
- easy-table-of-contents.php +39 -17
- includes/class.options.php +2 -2
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: table of contents, toc
|
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.6.20
|
8 |
-
Stable tag: 2.0.33
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -106,6 +106,9 @@ Easy Table Contents is a fork of the excellent [Table of Contents Plus](https://
|
|
106 |
|
107 |
== Changelog ==
|
108 |
|
|
|
|
|
|
|
109 |
= 2.0.33 08/06/2022 =
|
110 |
* BUG: Sticky Toggle JS issue when disabled Auto Insert & not added manual Shortcode #272
|
111 |
* BUG: Ad Invalid Click Protector plugin is having conflicted #267
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.6.20
|
8 |
+
Stable tag: 2.0.33.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
106 |
|
107 |
== Changelog ==
|
108 |
|
109 |
+
= 2.0.33.1 08/07/2022 =
|
110 |
+
* BUG: The numbering of the titles has disappeared after latest update. #281
|
111 |
+
|
112 |
= 2.0.33 08/06/2022 =
|
113 |
* BUG: Sticky Toggle JS issue when disabled Auto Insert & not added manual Shortcode #272
|
114 |
* BUG: Ad Invalid Click Protector plugin is having conflicted #267
|
assets/js/admin.js
CHANGED
@@ -5,17 +5,18 @@ jQuery(document).ready(function ($) {
|
|
5 |
if (ez_toc_color_picker.length) {
|
6 |
ez_toc_color_picker.wpColorPicker();
|
7 |
}
|
8 |
-
|
9 |
-
var
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
19 |
$("#subscribe-newsletter-form").on('submit', function (e) {
|
20 |
e.preventDefault();
|
21 |
var $form = $("#subscribe-newsletter-form");
|
5 |
if (ez_toc_color_picker.length) {
|
6 |
ez_toc_color_picker.wpColorPicker();
|
7 |
}
|
8 |
+
|
9 |
+
var ezTocSettingsCustomWidth = document.getElementById('ez-toc-settings[width_custom]');
|
10 |
+
if(ezTocSettingsCustomWidth) {
|
11 |
+
ezTocSettingsCustomWidth.parentNode.parentNode.style.display = "none";
|
12 |
+
document.getElementById('ez-toc-settings[width]').addEventListener('change', function () {
|
13 |
+
if (document.getElementById('ez-toc-settings[width]').value == 'custom') {
|
14 |
+
ezTocSettingsCustomWidth.parentNode.parentNode.style.display = "revert";
|
15 |
+
} else {
|
16 |
+
ezTocSettingsCustomWidth.parentNode.parentNode.style.display = "none";
|
17 |
+
}
|
18 |
+
});
|
19 |
+
}
|
20 |
$("#subscribe-newsletter-form").on('submit', function (e) {
|
21 |
e.preventDefault();
|
22 |
var $form = $("#subscribe-newsletter-form");
|
assets/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function disableScrolling(){var e=window.scrollX,n=window.scrollY;window.onscroll=function(){window.scrollTo(e,n)}}function enableScrolling(){window.onscroll=function(){}}jQuery(document).ready((function(e){var n=e(".ez-toc-color-picker");n.length&&n.wpColorPicker();var t=document.getElementById("
|
1 |
+
function disableScrolling(){var e=window.scrollX,n=window.scrollY;window.onscroll=function(){window.scrollTo(e,n)}}function enableScrolling(){window.onscroll=function(){}}jQuery(document).ready((function(e){var n=e(".ez-toc-color-picker");n.length&&n.wpColorPicker();var t=document.getElementById("ez-toc-settings[width_custom]");t&&(t.parentNode.parentNode.style.display="none",document.getElementById("ez-toc-settings[width]").addEventListener("change",(function(){"custom"==document.getElementById("ez-toc-settings[width]").value?t.parentNode.parentNode.style.display="revert":t.parentNode.parentNode.style.display="none"}))),e("#subscribe-newsletter-form").on("submit",(function(n){n.preventDefault();var t=e("#subscribe-newsletter-form"),o=t.find('input[name="name"]').val(),c=t.find('input[name="email"]').val(),l=t.find('input[name="company"]').val();e.post(ajaxurl,{action:"eztoc_subscribe_newsletter",name:o,email:c,website:l,eztoc_security_nonce:cn_toc_admin_data.eztoc_security_nonce},(function(e){}))}))}));const unsecuredCopyToClipboard=e=>{const n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")}catch(e){console.error("Unable to copy to clipboard",e)}document.body.removeChild(n)};function ez_toc_clipboard(e,n,t,o){o.preventDefault(),disableScrolling();var c=t.parentNode.parentNode.querySelectorAll("#"+e)[0];c.select(),c.setSelectionRange(0,99999),unsecuredCopyToClipboard(c.value),t.querySelectorAll("span."+n)[0].innerHTML="Copied: "+c.value}function ez_toc_outFunc(e,n,t){t.preventDefault(),n.querySelectorAll("span."+e)[0].innerHTML="Copy to clipboard",enableScrolling()}
|
easy-table-of-contents.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Easy Table of Contents
|
4 |
* Plugin URI: https://magazine3.company/
|
5 |
* Description: Adds a user friendly and fully automatic way to create and display a table of contents generated from the page content.
|
6 |
-
* Version: 2.0.33
|
7 |
* Author: Magazine3
|
8 |
* Author URI: https://magazine3.company/
|
9 |
* Text Domain: easy-table-of-contents
|
@@ -26,7 +26,7 @@
|
|
26 |
* @package Easy Table of Contents
|
27 |
* @category Plugin
|
28 |
* @author Magazine3
|
29 |
-
* @version 2.0.33
|
30 |
*/
|
31 |
|
32 |
use Easy_Plugins\Table_Of_Contents\Debug;
|
@@ -48,7 +48,7 @@ if ( ! class_exists( 'ezTOC' ) ) {
|
|
48 |
* @since 1.0
|
49 |
* @var string
|
50 |
*/
|
51 |
-
const VERSION = '2.0.33';
|
52 |
|
53 |
/**
|
54 |
* Stores the instance of this class.
|
@@ -399,12 +399,29 @@ if ( ! class_exists( 'ezTOC' ) ) {
|
|
399 |
$inlineCSS .= <<<INLINECSS
|
400 |
.$directionClass {
|
401 |
direction: $direction;
|
402 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
INLINECSS;
|
404 |
-
|
405 |
-
if( $direction == 'rtl' )
|
406 |
-
|
407 |
-
$directionClass .= '-rtl';
|
408 |
$length = 6;
|
409 |
$counterRTLCSS = self::rtlCounterResetCSS( $length, $class );
|
410 |
$counterRTLCSS .= self::rtlCounterIncrementCSS( $length, $class );
|
@@ -413,29 +430,34 @@ INLINECSS;
|
|
413 |
$counterRTLCSS
|
414 |
INLINECSS;
|
415 |
}
|
416 |
-
if( $direction == 'ltr' )
|
|
|
417 |
$inlineCSS .= <<<INLINECSS
|
418 |
.$class ul {
|
419 |
counter-reset: item;
|
420 |
-
}
|
421 |
|
422 |
-
.$class nav ul li a
|
423 |
content: counters(item, ".", $list_type) ". ";
|
424 |
display: inline-block;
|
425 |
counter-increment: item;
|
426 |
-
|
427 |
-
}
|
428 |
INLINECSS;
|
429 |
}
|
430 |
} else {
|
|
|
|
|
431 |
$inlineCSS .= <<<INLINECSS
|
432 |
.$class ul {
|
|
|
433 |
counter-reset: item;
|
434 |
-
}
|
435 |
-
.$class nav ul li a
|
436 |
content: counter(item, $list_type) " ";
|
437 |
-
|
438 |
-
|
|
|
439 |
INLINECSS;
|
440 |
|
441 |
}
|
3 |
* Plugin Name: Easy Table of Contents
|
4 |
* Plugin URI: https://magazine3.company/
|
5 |
* Description: Adds a user friendly and fully automatic way to create and display a table of contents generated from the page content.
|
6 |
+
* Version: 2.0.33.1
|
7 |
* Author: Magazine3
|
8 |
* Author URI: https://magazine3.company/
|
9 |
* Text Domain: easy-table-of-contents
|
26 |
* @package Easy Table of Contents
|
27 |
* @category Plugin
|
28 |
* @author Magazine3
|
29 |
+
* @version 2.0.33.1
|
30 |
*/
|
31 |
|
32 |
use Easy_Plugins\Table_Of_Contents\Debug;
|
48 |
* @since 1.0
|
49 |
* @var string
|
50 |
*/
|
51 |
+
const VERSION = '2.0.33.1';
|
52 |
|
53 |
/**
|
54 |
* Stores the instance of this class.
|
399 |
$inlineCSS .= <<<INLINECSS
|
400 |
.$directionClass {
|
401 |
direction: $direction;
|
402 |
+
}\n\n
|
403 |
+
INLINECSS;
|
404 |
+
$listAnchorPosition = 'before';
|
405 |
+
$marginCSS = 'margin-right: .2em;';
|
406 |
+
if( $direction == 'rtl' )
|
407 |
+
{
|
408 |
+
$class .= '-rtl';
|
409 |
+
if($list_type == 'cjk-earthly-branch')
|
410 |
+
$listAnchorPosition = 'after';
|
411 |
+
|
412 |
+
$marginCSS = 'margin-left: .2em;';
|
413 |
+
}
|
414 |
+
|
415 |
+
if( $list_type == '- ' ) {
|
416 |
+
$inlineCSS .= <<<INLINECSS
|
417 |
+
.$class nav ul li {
|
418 |
+
list-style-type: '- ' !important;
|
419 |
+
list-style-position: inside !important;
|
420 |
+
}\n\n
|
421 |
INLINECSS;
|
422 |
+
} else if( in_array($list_type, $listTypesForCounting)) {
|
423 |
+
if( $direction == 'rtl' )
|
424 |
+
{
|
|
|
425 |
$length = 6;
|
426 |
$counterRTLCSS = self::rtlCounterResetCSS( $length, $class );
|
427 |
$counterRTLCSS .= self::rtlCounterIncrementCSS( $length, $class );
|
430 |
$counterRTLCSS
|
431 |
INLINECSS;
|
432 |
}
|
433 |
+
if( $direction == 'ltr' )
|
434 |
+
{
|
435 |
$inlineCSS .= <<<INLINECSS
|
436 |
.$class ul {
|
437 |
counter-reset: item;
|
438 |
+
}\n\n
|
439 |
|
440 |
+
.$class nav ul li a::$listAnchorPosition {
|
441 |
content: counters(item, ".", $list_type) ". ";
|
442 |
display: inline-block;
|
443 |
counter-increment: item;
|
444 |
+
$marginCSS
|
445 |
+
}\n\n
|
446 |
INLINECSS;
|
447 |
}
|
448 |
} else {
|
449 |
+
|
450 |
+
|
451 |
$inlineCSS .= <<<INLINECSS
|
452 |
.$class ul {
|
453 |
+
direction: $direction;
|
454 |
counter-reset: item;
|
455 |
+
}\n\n
|
456 |
+
.$class nav ul li a::$listAnchorPosition {
|
457 |
content: counter(item, $list_type) " ";
|
458 |
+
$marginCSS
|
459 |
+
counter-increment: item;
|
460 |
+
}\n\n
|
461 |
INLINECSS;
|
462 |
|
463 |
}
|
includes/class.options.php
CHANGED
@@ -799,7 +799,7 @@ if ( ! class_exists( 'ezTOC_Option' ) ) {
|
|
799 |
*/
|
800 |
public static function getCounterListDecimal() {
|
801 |
return array(
|
802 |
-
|
803 |
'decimal-leading-zero' => __( 'Decimal Leading Zero', 'easy-table-of-contents' ),
|
804 |
'cjk-decimal' => __( 'CJK Decimal', 'easy-table-of-contents' ),
|
805 |
);
|
@@ -816,7 +816,7 @@ if ( ! class_exists( 'ezTOC_Option' ) ) {
|
|
816 |
return array(
|
817 |
'upper-roman' => __( 'Upper Roman', 'easy-table-of-contents' ),
|
818 |
'lower-roman' => __( 'Lower Roman', 'easy-table-of-contents' ),
|
819 |
-
'upper-greek' => __( 'Upper Greek', 'easy-table-of-contents' ),
|
820 |
'lower-greek' => __( 'Lower Greek', 'easy-table-of-contents' ),
|
821 |
'upper-alpha' => __( 'Upper Alpha/Latin', 'easy-table-of-contents' ),
|
822 |
'lower-alpha' => __( 'Lower Alpha/Latin', 'easy-table-of-contents' ),
|
799 |
*/
|
800 |
public static function getCounterListDecimal() {
|
801 |
return array(
|
802 |
+
'decimal' => __( 'Decimal (default)', 'easy-table-of-contents' ),
|
803 |
'decimal-leading-zero' => __( 'Decimal Leading Zero', 'easy-table-of-contents' ),
|
804 |
'cjk-decimal' => __( 'CJK Decimal', 'easy-table-of-contents' ),
|
805 |
);
|
816 |
return array(
|
817 |
'upper-roman' => __( 'Upper Roman', 'easy-table-of-contents' ),
|
818 |
'lower-roman' => __( 'Lower Roman', 'easy-table-of-contents' ),
|
819 |
+
// 'upper-greek' => __( 'Upper Greek', 'easy-table-of-contents' ),
|
820 |
'lower-greek' => __( 'Lower Greek', 'easy-table-of-contents' ),
|
821 |
'upper-alpha' => __( 'Upper Alpha/Latin', 'easy-table-of-contents' ),
|
822 |
'lower-alpha' => __( 'Lower Alpha/Latin', 'easy-table-of-contents' ),
|