Version Description
11/05/2022 = * BUG: Last version removed sidebar & some other contents #329 * BUG: Structured plugin is broken with TOC 2.0.35 + Pure CSS stopped working #327 * BUG: After updating the 2.0.35 10/29/2022 version, the interface code component can only display one line #326 * BUG: Anchor links not working if the position "After first paragraph" is selected. #319 * BUG: Name entity should be a mandatory field while adding the TOC as a block in widget area. #318 * BUG: It is making the heading to repeat when we are selecting the option "After the first paragraph." #310 * BUG: Shortcode are not working with Salient theme #271
Download this release
Release Info
Developer | magazine3 |
Plugin | Easy Table of Contents |
Version | 2.0.36 |
Comparing to | |
See all releases |
Code changes from version 2.0.35.2 to 2.0.36
- README.txt +10 -1
- assets/css/ez-toc-sticky.css +0 -4
- assets/css/ez-toc-sticky.min.css +1 -1
- assets/css/screen.css +0 -4
- assets/css/screen.min.css +1 -1
- easy-table-of-contents.php +6 -7
- includes/class.post.php +4 -7
- includes/class.widget-toc.php +1 -1
- includes/inc.functions.php +1 -1
- includes/inc.plugin-compatibility.php +28 -0
- includes/inc.string-functions.php +18 -0
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.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -105,6 +105,15 @@ Easy Table Contents is a fork of the excellent [Table of Contents Plus](https://
|
|
105 |
4. Activate the plugin on the Plugins admin page.
|
106 |
|
107 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
= 2.0.35.2 11/02/2022 =
|
109 |
* BUG: Jump anchors on new headings not working after the update of last version 2.0.35
|
110 |
* BUG: The TOC is not showing on the sidebar of all posts with the latest update 2.0.35
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.6.20
|
8 |
+
Stable tag: 2.0.36
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
105 |
4. Activate the plugin on the Plugins admin page.
|
106 |
|
107 |
== Changelog ==
|
108 |
+
= 2.0.36 11/05/2022 =
|
109 |
+
* BUG: Last version removed sidebar & some other contents #329
|
110 |
+
* BUG: Structured plugin is broken with TOC 2.0.35 + Pure CSS stopped working #327
|
111 |
+
* BUG: After updating the 2.0.35 10/29/2022 version, the interface code component can only display one line #326
|
112 |
+
* BUG: Anchor links not working if the position "After first paragraph" is selected. #319
|
113 |
+
* BUG: Name entity should be a mandatory field while adding the TOC as a block in widget area. #318
|
114 |
+
* BUG: It is making the heading to repeat when we are selecting the option "After the first paragraph." #310
|
115 |
+
* BUG: Shortcode are not working with Salient theme #271
|
116 |
+
|
117 |
= 2.0.35.2 11/02/2022 =
|
118 |
* BUG: Jump anchors on new headings not working after the update of last version 2.0.35
|
119 |
* BUG: The TOC is not showing on the sidebar of all posts with the latest update 2.0.35
|
assets/css/ez-toc-sticky.css
CHANGED
@@ -349,10 +349,6 @@ label.cssiconcheckbox {
|
|
349 |
display: none;
|
350 |
}
|
351 |
|
352 |
-
div#ez-toc-sticky-container.afterpara + p {
|
353 |
-
display: none;
|
354 |
-
}
|
355 |
-
|
356 |
.ez-toc-sticky-widget-container ul li a {
|
357 |
padding-left: 10px;
|
358 |
}
|
349 |
display: none;
|
350 |
}
|
351 |
|
|
|
|
|
|
|
|
|
352 |
.ez-toc-sticky-widget-container ul li a {
|
353 |
padding-left: 10px;
|
354 |
}
|
assets/css/ez-toc-sticky.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#ez-toc-sticky-container{background:#fff;border:1px solid #aaa;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);display:table;margin-bottom:1em;padding:10px;position:relative;width:auto}div.ez-toc-sticky-widget-container{padding:0;position:relative}#ez-toc-sticky-container.ez-toc-sticky-light-blue{background:#edf6ff}#ez-toc-sticky-container.ez-toc-sticky-white{background:#fff}#ez-toc-sticky-container.ez-toc-sticky-black{background:#000}#ez-toc-sticky-container.ez-toc-sticky-transparent{background:none}div.ez-toc-sticky-widget-container ul{display:block}div.ez-toc-sticky-widget-container li{border:none;padding:0}div.ez-toc-sticky-widget-container ul.ez-toc-sticky-list{padding:10px}#ez-toc-sticky-container ul ul,.ez-toc div.ez-toc-sticky-widget-container ul ul{margin-left:1.5em}#ez-toc-sticky-container li,#ez-toc-sticky-container ul{padding:0}#ez-toc-sticky-container li,#ez-toc-sticky-container ul,#ez-toc-sticky-container ul li,div.ez-toc-sticky-widget-container,div.ez-toc-sticky-widget-container li{background:0 0;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}#ez-toc-sticky-container p.ez-toc-sticky-title{text-align:left;line-height:1.45;margin:0;padding:0}.ez-toc-sticky-title-container{display:table;width:100%}.ez-toc-sticky-title,.ez-toc-sticky-title-toggle{display:table-cell;text-align:left;vertical-align:middle}#ez-toc-sticky-container.ez-toc-sticky-black a,#ez-toc-sticky-container.ez-toc-sticky-black a:visited,#ez-toc-sticky-container.ez-toc-sticky-black p.ez-toc-sticky-title{color:#fff}#ez-toc-sticky-container div.ez-toc-sticky-title-container+ul.ez-toc-sticky-list{margin-top:1em}.ez-toc-sticky-wrap-left{float:left;margin-right:10px}.ez-toc-sticky-wrap-right{float:right;margin-left:10px}.ez-toc-sticky-wrap-center{margin:0 auto}#ez-toc-sticky-container a{color:#444;box-shadow:none;text-decoration:none;text-shadow:none;display:inline-flex;align-items:stretch;flex-wrap:nowrap}#ez-toc-sticky-container a:visited{color:#9f9f9f}#ez-toc-sticky-container a:hover{text-decoration:underline}#ez-toc-sticky-container a.ez-toc-sticky-toggle{color:#444}.ez-toc-sticky-widget-container ul.ez-toc-sticky-list li::before{content:' ';position:absolute;left:0;right:0;height:30px;line-height:30px;z-index:-1}.ez-toc-sticky-widget-container ul.ez-toc-sticky-list li.active{background-color:#ededed;height:auto!important}.ez-toc-sticky-widget-container li.active>a{font-weight:900}.ez-toc-sticky-btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.ez-toc-sticky-btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ez-toc-sticky-btn:focus,.ez-toc-sticky-btn:hover{color:#333;text-decoration:none}.ez-toc-sticky-btn.active,.ez-toc-sticky-btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.ez-toc-sticky-btn-default{color:#333;background-color:#fff;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e0e0e0));background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-moz-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);background-repeat:repeat-x;border-color:#ccc}.ez-toc-sticky-btn-default.active,.ez-toc-sticky-btn-default:active,.ez-toc-sticky-btn-default:focus,.ez-toc-sticky-btn-default:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.ez-toc-sticky-btn-default.active,.ez-toc-sticky-btn-default:active{background-image:none;background-color:#e0e0e0;border-color:#dbdbdb}.ez-toc-sticky-btn-sm,.ez-toc-sticky-btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.ez-toc-sticky-btn-xs{padding:1px 5px}.ez-toc-sticky-btn-default:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.active,.ez-toc-sticky-btn:active{background-image:none}.ez-toc-sticky-btn-default:focus,.ez-toc-sticky-btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.ez-toc-sticky-pull-right{float:right!important;margin-left:10px}.ez-toc-sticky-glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;line-height:1;-moz-osx-font-smoothing:grayscale}.ez-toc-sticky-glyphicon:empty{width:1em}.ez-toc-sticky-toggle i.ez-toc-sticky-glyphicon,label.cssicon .ez-toc-sticky-glyphicon:empty{font-size:16px;margin-left:2px}#ez-toc-sticky-container input{position:absolute;left:-999em}#ez-toc-sticky-container input[type=checkbox]:checked+nav{opacity:0;max-height:0;border:none;display:none}#ez-toc-sticky-container label{float:right;position:relative;left:10px;font-size:16px;background:#f9efef;padding:0 4px 0 5px;border:1px solid #999191;border-radius:5px;cursor:pointer}div#ez-toc-sticky-container p.ez-toc-sticky-title{display:contents}div#ez-toc-sticky-container{padding-right:20px}
|
1 |
+
#ez-toc-sticky-container{background:#fff;border:1px solid #aaa;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);display:table;margin-bottom:1em;padding:10px;position:relative;width:auto}div.ez-toc-sticky-widget-container{padding:0;position:relative}#ez-toc-sticky-container.ez-toc-sticky-light-blue{background:#edf6ff}#ez-toc-sticky-container.ez-toc-sticky-white{background:#fff}#ez-toc-sticky-container.ez-toc-sticky-black{background:#000}#ez-toc-sticky-container.ez-toc-sticky-transparent{background:none}div.ez-toc-sticky-widget-container ul{display:block}div.ez-toc-sticky-widget-container li{border:none;padding:0}div.ez-toc-sticky-widget-container ul.ez-toc-sticky-list{padding:10px}#ez-toc-sticky-container ul ul,.ez-toc div.ez-toc-sticky-widget-container ul ul{margin-left:1.5em}#ez-toc-sticky-container li,#ez-toc-sticky-container ul{padding:0}#ez-toc-sticky-container li,#ez-toc-sticky-container ul,#ez-toc-sticky-container ul li,div.ez-toc-sticky-widget-container,div.ez-toc-sticky-widget-container li{background:0 0;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}#ez-toc-sticky-container p.ez-toc-sticky-title{text-align:left;line-height:1.45;margin:0;padding:0}.ez-toc-sticky-title-container{display:table;width:100%}.ez-toc-sticky-title,.ez-toc-sticky-title-toggle{display:table-cell;text-align:left;vertical-align:middle}#ez-toc-sticky-container.ez-toc-sticky-black a,#ez-toc-sticky-container.ez-toc-sticky-black a:visited,#ez-toc-sticky-container.ez-toc-sticky-black p.ez-toc-sticky-title{color:#fff}#ez-toc-sticky-container div.ez-toc-sticky-title-container+ul.ez-toc-sticky-list{margin-top:1em}.ez-toc-sticky-wrap-left{float:left;margin-right:10px}.ez-toc-sticky-wrap-right{float:right;margin-left:10px}.ez-toc-sticky-wrap-center{margin:0 auto}#ez-toc-sticky-container a{color:#444;box-shadow:none;text-decoration:none;text-shadow:none;display:inline-flex;align-items:stretch;flex-wrap:nowrap}#ez-toc-sticky-container a:visited{color:#9f9f9f}#ez-toc-sticky-container a:hover{text-decoration:underline}#ez-toc-sticky-container a.ez-toc-sticky-toggle{color:#444}.ez-toc-sticky-widget-container ul.ez-toc-sticky-list li::before{content:' ';position:absolute;left:0;right:0;height:30px;line-height:30px;z-index:-1}.ez-toc-sticky-widget-container ul.ez-toc-sticky-list li.active{background-color:#ededed;height:auto!important}.ez-toc-sticky-widget-container li.active>a{font-weight:900}.ez-toc-sticky-btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.ez-toc-sticky-btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ez-toc-sticky-btn:focus,.ez-toc-sticky-btn:hover{color:#333;text-decoration:none}.ez-toc-sticky-btn.active,.ez-toc-sticky-btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.ez-toc-sticky-btn-default{color:#333;background-color:#fff;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e0e0e0));background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-moz-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);background-repeat:repeat-x;border-color:#ccc}.ez-toc-sticky-btn-default.active,.ez-toc-sticky-btn-default:active,.ez-toc-sticky-btn-default:focus,.ez-toc-sticky-btn-default:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.ez-toc-sticky-btn-default.active,.ez-toc-sticky-btn-default:active{background-image:none;background-color:#e0e0e0;border-color:#dbdbdb}.ez-toc-sticky-btn-sm,.ez-toc-sticky-btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.ez-toc-sticky-btn-xs{padding:1px 5px}.ez-toc-sticky-btn-default:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.active,.ez-toc-sticky-btn:active{background-image:none}.ez-toc-sticky-btn-default:focus,.ez-toc-sticky-btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.ez-toc-sticky-pull-right{float:right!important;margin-left:10px}.ez-toc-sticky-glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;line-height:1;-moz-osx-font-smoothing:grayscale}.ez-toc-sticky-glyphicon:empty{width:1em}.ez-toc-sticky-toggle i.ez-toc-sticky-glyphicon,label.cssicon .ez-toc-sticky-glyphicon:empty{font-size:16px;margin-left:2px}#ez-toc-sticky-container input{position:absolute;left:-999em}#ez-toc-sticky-container input[type=checkbox]:checked+nav{opacity:0;max-height:0;border:none;display:none}#ez-toc-sticky-container label{float:right;position:relative;left:10px;font-size:16px;background:#f9efef;padding:0 4px 0 5px;border:1px solid #999191;border-radius:5px;cursor:pointer}div#ez-toc-sticky-container p.ez-toc-sticky-title{display:contents}div#ez-toc-sticky-container{padding-right:20px}label.cssiconcheckbox{display:none}.ez-toc-sticky-widget-container ul li a{padding-left:10px}
|
assets/css/screen.css
CHANGED
@@ -374,10 +374,6 @@ label.cssiconcheckbox {
|
|
374 |
display: none;
|
375 |
}
|
376 |
|
377 |
-
div#ez-toc-container.afterpara + p {
|
378 |
-
display: none;
|
379 |
-
}
|
380 |
-
|
381 |
.ez-toc-widget-container ul li a {
|
382 |
padding-left: 10px;
|
383 |
display: inline-flex;
|
374 |
display: none;
|
375 |
}
|
376 |
|
|
|
|
|
|
|
|
|
377 |
.ez-toc-widget-container ul li a {
|
378 |
padding-left: 10px;
|
379 |
display: inline-flex;
|
assets/css/screen.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#ez-toc-container{background:#f9f9f9;border:1px solid #aaa;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);display:table;margin-bottom:1em;padding:10px;position:relative;width:auto}div.ez-toc-widget-container{padding:0;position:relative}#ez-toc-container.ez-toc-light-blue{background:#edf6ff}#ez-toc-container.ez-toc-white{background:#fff}#ez-toc-container.ez-toc-black{background:#000}#ez-toc-container.ez-toc-transparent{background:none}div.ez-toc-widget-container ul{display:block}div.ez-toc-widget-container li{border:none;padding:0}div.ez-toc-widget-container ul.ez-toc-list{padding:10px}#ez-toc-container ul ul,.ez-toc div.ez-toc-widget-container ul ul{margin-left:1.5em}#ez-toc-container li,#ez-toc-container ul{padding:0}#ez-toc-container li,#ez-toc-container ul,#ez-toc-container ul li,div.ez-toc-widget-container,div.ez-toc-widget-container li{background:0 0;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}#ez-toc-container p.ez-toc-title{text-align:left;line-height:1.45;margin:0;padding:0}.ez-toc-title-container{display:table;width:100%}.ez-toc-title,.ez-toc-title-toggle{display:inline;text-align:left;vertical-align:middle}.ez-toc-btn,.ez-toc-glyphicon{display:inline-block;font-weight:400}#ez-toc-container.ez-toc-black a,#ez-toc-container.ez-toc-black a:visited,#ez-toc-container.ez-toc-black p.ez-toc-title{color:#fff}#ez-toc-container div.ez-toc-title-container+ul.ez-toc-list{margin-top:1em}.ez-toc-wrap-left{float:left;margin-right:10px}.ez-toc-wrap-right{float:right;margin-left:10px}#ez-toc-container a{color:#444;box-shadow:none;text-decoration:none;text-shadow:none;display:inline-flex;align-items:stretch;flex-wrap:nowrap}#ez-toc-container a:visited{color:#9f9f9f}#ez-toc-container a:hover{text-decoration:underline}.ez-toc-widget-container ul.ez-toc-list li::before{content:' ';position:absolute;left:0;right:0;height:30px;line-height:30px;z-index:-1}.ez-toc-widget-container ul.ez-toc-list li.active{background-color:#ededed;height:auto!important}.ez-toc-widget-container li.active>a{font-weight:900}.ez-toc-btn{padding:6px 12px;margin-bottom:0;font-size:14px;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.ez-toc-btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ez-toc-btn:focus,.ez-toc-btn:hover{color:#333;text-decoration:none}.ez-toc-btn.active,.ez-toc-btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.ez-toc-btn-default{color:#333;background-color:#fff;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e0e0e0));background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-moz-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);background-repeat:repeat-x;border-color:#ccc}.ez-toc-btn-default.active,.ez-toc-btn-default:active,.ez-toc-btn-default:focus,.ez-toc-btn-default:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.ez-toc-btn-default.active,.ez-toc-btn-default:active{background-image:none;background-color:#e0e0e0;border-color:#dbdbdb}.ez-toc-btn-sm,.ez-toc-btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.ez-toc-btn-xs{padding:1px 5px}.ez-toc-btn-default:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.active,.ez-toc-btn:active{background-image:none}.ez-toc-btn-default:focus,.ez-toc-btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.ez-toc-pull-right{float:right!important;margin-left:10px}#ez-toc-container label.cssicon{height:30px}.ez-toc-glyphicon{position:relative;top:1px;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;line-height:1;-moz-osx-font-smoothing:grayscale}.ez-toc-glyphicon:empty{width:1em}.ez-toc-toggle i.ez-toc-glyphicon,label.cssicon .ez-toc-glyphicon:empty{font-size:16px;margin-left:2px}#ez-toc-container input,.ez-toc-toggle #item{position:absolute;left:-999em}#ez-toc-container input[type=checkbox]:checked+nav{opacity:0;max-height:0;border:none;display:none}#ez-toc-container label{float:right;position:relative;font-size:16px;padding:0 4px 0 5px;border:1px solid #999191;border-radius:5px;cursor:pointer;width:30px;left:10px}#ez-toc-container .ez-toc-toggle label,#ez-toc-container label.cssicon{float:right;position:relative;font-size:16px;padding:0;border:1px solid #999191;border-radius:5px;cursor:pointer;left:10px;width:35px}div#ez-toc-container p.ez-toc-title{display:contents}div#ez-toc-container{padding-right:20px}.ez-toc-wrap-center{margin:0 auto}#ez-toc-container a.ez-toc-toggle{display:flex;align-items:center;color:#444;background:inherit;border:inherit}
|
1 |
+
#ez-toc-container{background:#f9f9f9;border:1px solid #aaa;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);display:table;margin-bottom:1em;padding:10px;position:relative;width:auto}div.ez-toc-widget-container{padding:0;position:relative}#ez-toc-container.ez-toc-light-blue{background:#edf6ff}#ez-toc-container.ez-toc-white{background:#fff}#ez-toc-container.ez-toc-black{background:#000}#ez-toc-container.ez-toc-transparent{background:none}div.ez-toc-widget-container ul{display:block}div.ez-toc-widget-container li{border:none;padding:0}div.ez-toc-widget-container ul.ez-toc-list{padding:10px}#ez-toc-container ul ul,.ez-toc div.ez-toc-widget-container ul ul{margin-left:1.5em}#ez-toc-container li,#ez-toc-container ul{padding:0}#ez-toc-container li,#ez-toc-container ul,#ez-toc-container ul li,div.ez-toc-widget-container,div.ez-toc-widget-container li{background:0 0;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}#ez-toc-container p.ez-toc-title{text-align:left;line-height:1.45;margin:0;padding:0}.ez-toc-title-container{display:table;width:100%}.ez-toc-title,.ez-toc-title-toggle{display:inline;text-align:left;vertical-align:middle}.ez-toc-btn,.ez-toc-glyphicon{display:inline-block;font-weight:400}#ez-toc-container.ez-toc-black a,#ez-toc-container.ez-toc-black a:visited,#ez-toc-container.ez-toc-black p.ez-toc-title{color:#fff}#ez-toc-container div.ez-toc-title-container+ul.ez-toc-list{margin-top:1em}.ez-toc-wrap-left{float:left;margin-right:10px}.ez-toc-wrap-right{float:right;margin-left:10px}#ez-toc-container a{color:#444;box-shadow:none;text-decoration:none;text-shadow:none;display:inline-flex;align-items:stretch;flex-wrap:nowrap}#ez-toc-container a:visited{color:#9f9f9f}#ez-toc-container a:hover{text-decoration:underline}.ez-toc-widget-container ul.ez-toc-list li::before{content:' ';position:absolute;left:0;right:0;height:30px;line-height:30px;z-index:-1}.ez-toc-widget-container ul.ez-toc-list li.active{background-color:#ededed;height:auto!important}.ez-toc-widget-container li.active>a{font-weight:900}.ez-toc-btn{padding:6px 12px;margin-bottom:0;font-size:14px;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.ez-toc-btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ez-toc-btn:focus,.ez-toc-btn:hover{color:#333;text-decoration:none}.ez-toc-btn.active,.ez-toc-btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.ez-toc-btn-default{color:#333;background-color:#fff;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e0e0e0));background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-moz-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);background-repeat:repeat-x;border-color:#ccc}.ez-toc-btn-default.active,.ez-toc-btn-default:active,.ez-toc-btn-default:focus,.ez-toc-btn-default:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.ez-toc-btn-default.active,.ez-toc-btn-default:active{background-image:none;background-color:#e0e0e0;border-color:#dbdbdb}.ez-toc-btn-sm,.ez-toc-btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.ez-toc-btn-xs{padding:1px 5px}.ez-toc-btn-default:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.active,.ez-toc-btn:active{background-image:none}.ez-toc-btn-default:focus,.ez-toc-btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.ez-toc-pull-right{float:right!important;margin-left:10px}#ez-toc-container label.cssicon{height:30px}.ez-toc-glyphicon{position:relative;top:1px;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;line-height:1;-moz-osx-font-smoothing:grayscale}.ez-toc-glyphicon:empty{width:1em}.ez-toc-toggle i.ez-toc-glyphicon,label.cssicon .ez-toc-glyphicon:empty{font-size:16px;margin-left:2px}#ez-toc-container input,.ez-toc-toggle #item{position:absolute;left:-999em}#ez-toc-container input[type=checkbox]:checked+nav{opacity:0;max-height:0;border:none;display:none}#ez-toc-container label{float:right;position:relative;font-size:16px;padding:0 4px 0 5px;border:1px solid #999191;border-radius:5px;cursor:pointer;width:30px;left:10px}#ez-toc-container .ez-toc-toggle label,#ez-toc-container label.cssicon{float:right;position:relative;font-size:16px;padding:0;border:1px solid #999191;border-radius:5px;cursor:pointer;left:10px;width:35px}div#ez-toc-container p.ez-toc-title{display:contents}div#ez-toc-container{padding-right:20px}.ez-toc-wrap-center{margin:0 auto}#ez-toc-container a.ez-toc-toggle{display:flex;align-items:center;color:#444;background:inherit;border:inherit}label.cssiconcheckbox{display:none}.ez-toc-widget-container ul li a{padding-left:10px;display:inline-flex;align-items:stretch;flex-wrap:nowrap}
|
easy-table-of-contents.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Easy Table of Contents
|
4 |
* Plugin URI: https://tocwp.com/
|
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.
|
7 |
* Author: Magazine3
|
8 |
* Author URI: https://tocwp.com/
|
9 |
* Text Domain: easy-table-of-contents
|
@@ -26,10 +26,11 @@
|
|
26 |
* @package Easy Table of Contents
|
27 |
* @category Plugin
|
28 |
* @author Magazine3
|
29 |
-
* @version 2.0.
|
30 |
*/
|
31 |
|
32 |
use Easy_Plugins\Table_Of_Contents\Debug;
|
|
|
33 |
use function Easy_Plugins\Table_Of_Contents\String\mb_find_replace;
|
34 |
|
35 |
// Exit if accessed directly
|
@@ -48,7 +49,7 @@ if ( ! class_exists( 'ezTOC' ) ) {
|
|
48 |
* @since 1.0
|
49 |
* @var string
|
50 |
*/
|
51 |
-
const VERSION = '2.0.
|
52 |
|
53 |
/**
|
54 |
* Stores the instance of this class.
|
@@ -1044,7 +1045,7 @@ INLINESTICKYTOGGLEJS;
|
|
1044 |
// static $run = true;
|
1045 |
$html = '';
|
1046 |
|
1047 |
-
if ( 'ez-toc' == $tag
|
1048 |
|
1049 |
$post = self::get( get_the_ID() );
|
1050 |
|
@@ -1216,9 +1217,7 @@ INLINESTICKYTOGGLEJS;
|
|
1216 |
$content = mb_find_replace( $find, $replace, $content );
|
1217 |
break;
|
1218 |
case 'afterpara':
|
1219 |
-
$
|
1220 |
-
$first_para = $matches[1][0];
|
1221 |
-
$content = $first_para . $toc . $content;
|
1222 |
break;
|
1223 |
case 'before':
|
1224 |
default:
|
3 |
* Plugin Name: Easy Table of Contents
|
4 |
* Plugin URI: https://tocwp.com/
|
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.36
|
7 |
* Author: Magazine3
|
8 |
* Author URI: https://tocwp.com/
|
9 |
* Text Domain: easy-table-of-contents
|
26 |
* @package Easy Table of Contents
|
27 |
* @category Plugin
|
28 |
* @author Magazine3
|
29 |
+
* @version 2.0.36
|
30 |
*/
|
31 |
|
32 |
use Easy_Plugins\Table_Of_Contents\Debug;
|
33 |
+
use function Easy_Plugins\Table_Of_Contents\String\insertElementByPTag;
|
34 |
use function Easy_Plugins\Table_Of_Contents\String\mb_find_replace;
|
35 |
|
36 |
// Exit if accessed directly
|
49 |
* @since 1.0
|
50 |
* @var string
|
51 |
*/
|
52 |
+
const VERSION = '2.0.36';
|
53 |
|
54 |
/**
|
55 |
* Stores the instance of this class.
|
1045 |
// static $run = true;
|
1046 |
$html = '';
|
1047 |
|
1048 |
+
if ( 'ez-toc' == $tag ) {
|
1049 |
|
1050 |
$post = self::get( get_the_ID() );
|
1051 |
|
1217 |
$content = mb_find_replace( $find, $replace, $content );
|
1218 |
break;
|
1219 |
case 'afterpara':
|
1220 |
+
$content = insertElementByPTag( mb_find_replace( $find, $replace, $content ), $toc );
|
|
|
|
|
1221 |
break;
|
1222 |
case 'before':
|
1223 |
default:
|
includes/class.post.php
CHANGED
@@ -262,11 +262,11 @@ class ezTOC_Post {
|
|
262 |
//}
|
263 |
$content = $this->post->post_content;
|
264 |
|
265 |
-
if ( in_array( 'js_composer_salient/js_composer.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
266 |
if ( empty( $content ) ) {
|
267 |
-
$content = get_option( 'ez-toc-post-meta-content' );
|
268 |
} else {
|
269 |
-
$content .= get_option( 'ez-toc-post-meta-content' );
|
270 |
}
|
271 |
}
|
272 |
|
@@ -1091,7 +1091,7 @@ class ezTOC_Post {
|
|
1091 |
$displayList = '';
|
1092 |
if( ezTOC_Option::get( 'visibility_hide_by_default' ) )
|
1093 |
{
|
1094 |
-
$displayList = "style='display:
|
1095 |
}
|
1096 |
$html = "<ul class='{$prefix}-list {$prefix}-list-level-1' $displayList>" . $html . "</ul>";
|
1097 |
}
|
@@ -1241,9 +1241,6 @@ class ezTOC_Post {
|
|
1241 |
$custom_classes = ezTOC_Option::get( 'css_container_class', '' );
|
1242 |
|
1243 |
$position = ezTOC_Option::get( 'position' );
|
1244 |
-
if($position == 'afterpara'){
|
1245 |
-
$custom_classes .= "afterpara";
|
1246 |
-
}
|
1247 |
|
1248 |
$class[] = 'ez-toc-container-direction';
|
1249 |
|
262 |
//}
|
263 |
$content = $this->post->post_content;
|
264 |
|
265 |
+
if ( in_array( 'js_composer_salient/js_composer.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && false !== get_option( 'ez-toc-post-meta-content' )[ get_the_ID() ] ) {
|
266 |
if ( empty( $content ) ) {
|
267 |
+
$content = get_option( 'ez-toc-post-meta-content' )[ get_the_ID() ];
|
268 |
} else {
|
269 |
+
$content .= get_option( 'ez-toc-post-meta-content' )[ get_the_ID() ];
|
270 |
}
|
271 |
}
|
272 |
|
1091 |
$displayList = '';
|
1092 |
if( ezTOC_Option::get( 'visibility_hide_by_default' ) )
|
1093 |
{
|
1094 |
+
$displayList = "style='display:block'";
|
1095 |
}
|
1096 |
$html = "<ul class='{$prefix}-list {$prefix}-list-level-1' $displayList>" . $html . "</ul>";
|
1097 |
}
|
1241 |
$custom_classes = ezTOC_Option::get( 'css_container_class', '' );
|
1242 |
|
1243 |
$position = ezTOC_Option::get( 'position' );
|
|
|
|
|
|
|
1244 |
|
1245 |
$class[] = 'ez-toc-container-direction';
|
1246 |
|
includes/class.widget-toc.php
CHANGED
@@ -328,7 +328,7 @@ if ( ! class_exists( 'ezTOC_Widget' ) ) {
|
|
328 |
$defaults = array(
|
329 |
'affix' => '0',
|
330 |
'highlight_color' => '#ededed',
|
331 |
-
'title' => '',
|
332 |
);
|
333 |
|
334 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
328 |
$defaults = array(
|
329 |
'affix' => '0',
|
330 |
'highlight_color' => '#ededed',
|
331 |
+
'title' => 'Table of Contents',
|
332 |
);
|
333 |
|
334 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
includes/inc.functions.php
CHANGED
@@ -92,7 +92,7 @@ function ez_toc_block( $post = null, $apply_content_filter = true ) {
|
|
92 |
}
|
93 |
|
94 |
function ez_toc_inline_styles(){
|
95 |
-
echo "<style>#ez-toc-container{background:#f9f9f9;border:1px solid #aaa;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);display:table;margin-bottom:1em;padding:10px;position:relative;width:auto}div.ez-toc-widget-container{padding:0;position:relative}#ez-toc-container.ez-toc-light-blue{background:#edf6ff}#ez-toc-container.ez-toc-white{background:#fff}#ez-toc-container.ez-toc-black{background:#000}#ez-toc-container.ez-toc-transparent{background:none}div.ez-toc-widget-container ul{display:block}div.ez-toc-widget-container li{border:none;padding:0}div.ez-toc-widget-container ul.ez-toc-list{padding:10px}#ez-toc-container ul ul,.ez-toc div.ez-toc-widget-container ul ul{margin-left:1.5em}#ez-toc-container li,#ez-toc-container ul{padding:0}#ez-toc-container li,#ez-toc-container ul,#ez-toc-container ul li,div.ez-toc-widget-container,div.ez-toc-widget-container li{background:0 0;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}#ez-toc-container p.ez-toc-title{text-align:left;line-height:1.45;margin:0;padding:0}.ez-toc-title-container{display:table;width:100%}.ez-toc-title,.ez-toc-title-toggle{display:inline;text-align:left;vertical-align:middle}.ez-toc-btn,.ez-toc-glyphicon{display:inline-block;font-weight:400}#ez-toc-container.ez-toc-black a,#ez-toc-container.ez-toc-black a:visited,#ez-toc-container.ez-toc-black p.ez-toc-title{color:#fff}#ez-toc-container div.ez-toc-title-container+ul.ez-toc-list{margin-top:1em}.ez-toc-wrap-left{float:left;margin-right:10px}.ez-toc-wrap-right{float:right;margin-left:10px}#ez-toc-container a{color:#444;box-shadow:none;text-decoration:none;text-shadow:none;display:inline-flex;align-items:stretch;flex-wrap:nowrap}#ez-toc-container a:visited{color:#9f9f9f}#ez-toc-container a:hover{text-decoration:underline}.ez-toc-widget-container ul.ez-toc-list li::before{content:' ';position:absolute;left:0;right:0;height:30px;line-height:30px;z-index:-1}.ez-toc-widget-container ul.ez-toc-list li.active{background-color:#ededed;height:auto!important}.ez-toc-widget-container li.active>a{font-weight:900}.ez-toc-btn{padding:6px 12px;margin-bottom:0;font-size:14px;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.ez-toc-btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ez-toc-btn:focus,.ez-toc-btn:hover{color:#333;text-decoration:none}.ez-toc-btn.active,.ez-toc-btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.ez-toc-btn-default{color:#333;background-color:#fff;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e0e0e0));background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-moz-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);background-repeat:repeat-x;border-color:#ccc}.ez-toc-btn-default.active,.ez-toc-btn-default:active,.ez-toc-btn-default:focus,.ez-toc-btn-default:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.ez-toc-btn-default.active,.ez-toc-btn-default:active{background-image:none;background-color:#e0e0e0;border-color:#dbdbdb}.ez-toc-btn-sm,.ez-toc-btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.ez-toc-btn-xs{padding:1px 5px}.ez-toc-btn-default:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.active,.ez-toc-btn:active{background-image:none}.ez-toc-btn-default:focus,.ez-toc-btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.ez-toc-pull-right{float:right!important;margin-left:10px}
|
96 |
}
|
97 |
if (ezTOC_Option::get( 'inline_css' )) {
|
98 |
add_action('wp_head', 'ez_toc_inline_styles');
|
92 |
}
|
93 |
|
94 |
function ez_toc_inline_styles(){
|
95 |
+
echo "<style>#ez-toc-container{background:#f9f9f9;border:1px solid #aaa;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);display:table;margin-bottom:1em;padding:10px;position:relative;width:auto}div.ez-toc-widget-container{padding:0;position:relative}#ez-toc-container.ez-toc-light-blue{background:#edf6ff}#ez-toc-container.ez-toc-white{background:#fff}#ez-toc-container.ez-toc-black{background:#000}#ez-toc-container.ez-toc-transparent{background:none}div.ez-toc-widget-container ul{display:block}div.ez-toc-widget-container li{border:none;padding:0}div.ez-toc-widget-container ul.ez-toc-list{padding:10px}#ez-toc-container ul ul,.ez-toc div.ez-toc-widget-container ul ul{margin-left:1.5em}#ez-toc-container li,#ez-toc-container ul{padding:0}#ez-toc-container li,#ez-toc-container ul,#ez-toc-container ul li,div.ez-toc-widget-container,div.ez-toc-widget-container li{background:0 0;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}#ez-toc-container p.ez-toc-title{text-align:left;line-height:1.45;margin:0;padding:0}.ez-toc-title-container{display:table;width:100%}.ez-toc-title,.ez-toc-title-toggle{display:inline;text-align:left;vertical-align:middle}.ez-toc-btn,.ez-toc-glyphicon{display:inline-block;font-weight:400}#ez-toc-container.ez-toc-black a,#ez-toc-container.ez-toc-black a:visited,#ez-toc-container.ez-toc-black p.ez-toc-title{color:#fff}#ez-toc-container div.ez-toc-title-container+ul.ez-toc-list{margin-top:1em}.ez-toc-wrap-left{float:left;margin-right:10px}.ez-toc-wrap-right{float:right;margin-left:10px}#ez-toc-container a{color:#444;box-shadow:none;text-decoration:none;text-shadow:none;display:inline-flex;align-items:stretch;flex-wrap:nowrap}#ez-toc-container a:visited{color:#9f9f9f}#ez-toc-container a:hover{text-decoration:underline}.ez-toc-widget-container ul.ez-toc-list li::before{content:' ';position:absolute;left:0;right:0;height:30px;line-height:30px;z-index:-1}.ez-toc-widget-container ul.ez-toc-list li.active{background-color:#ededed;height:auto!important}.ez-toc-widget-container li.active>a{font-weight:900}.ez-toc-btn{padding:6px 12px;margin-bottom:0;font-size:14px;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.ez-toc-btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ez-toc-btn:focus,.ez-toc-btn:hover{color:#333;text-decoration:none}.ez-toc-btn.active,.ez-toc-btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.ez-toc-btn-default{color:#333;background-color:#fff;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e0e0e0));background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-moz-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);background-repeat:repeat-x;border-color:#ccc}.ez-toc-btn-default.active,.ez-toc-btn-default:active,.ez-toc-btn-default:focus,.ez-toc-btn-default:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.ez-toc-btn-default.active,.ez-toc-btn-default:active{background-image:none;background-color:#e0e0e0;border-color:#dbdbdb}.ez-toc-btn-sm,.ez-toc-btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.ez-toc-btn-xs{padding:1px 5px}.ez-toc-btn-default:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.active,.ez-toc-btn:active{background-image:none}.ez-toc-btn-default:focus,.ez-toc-btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.ez-toc-pull-right{float:right!important;margin-left:10px}#ez-toc-container label.cssicon{height:30px}.ez-toc-glyphicon{position:relative;top:1px;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;line-height:1;-moz-osx-font-smoothing:grayscale}.ez-toc-glyphicon:empty{width:1em}.ez-toc-toggle i.ez-toc-glyphicon,label.cssicon .ez-toc-glyphicon:empty{font-size:16px;margin-left:2px}#ez-toc-container input,.ez-toc-toggle #item{position:absolute;left:-999em}#ez-toc-container input[type=checkbox]:checked+nav{opacity:0;max-height:0;border:none;display:none}#ez-toc-container label{float:right;position:relative;font-size:16px;padding:0 4px 0 5px;border:1px solid #999191;border-radius:5px;cursor:pointer;width:30px;left:10px}#ez-toc-container .ez-toc-toggle label,#ez-toc-container label.cssicon{float:right;position:relative;font-size:16px;padding:0;border:1px solid #999191;border-radius:5px;cursor:pointer;left:10px;width:35px}div#ez-toc-container p.ez-toc-title{display:contents}div#ez-toc-container{padding-right:20px}.ez-toc-wrap-center{margin:0 auto}#ez-toc-container a.ez-toc-toggle{display:flex;align-items:center;color:#444;background:inherit;border:inherit}label.cssiconcheckbox{display:none}.ez-toc-widget-container ul li a{padding-left:10px;display:inline-flex;align-items:stretch;flex-wrap:nowrap}</style>";
|
96 |
}
|
97 |
if (ezTOC_Option::get( 'inline_css' )) {
|
98 |
add_action('wp_head', 'ez_toc_inline_styles');
|
includes/inc.plugin-compatibility.php
CHANGED
@@ -585,4 +585,32 @@ function flBuilderLayoutDataEZTOC( $data ) {
|
|
585 |
}
|
586 |
}
|
587 |
return $data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
}
|
585 |
}
|
586 |
}
|
587 |
return $data;
|
588 |
+
}
|
589 |
+
|
590 |
+
/**
|
591 |
+
* Avada Theme Compatibility
|
592 |
+
* add inline custom css to set ez toc container
|
593 |
+
* on sidebar, for scrolling setup
|
594 |
+
* @since 2.0.35
|
595 |
+
*/
|
596 |
+
if ( in_array( 'fusion-core/fusion-core.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && ( 'Avada Child' == apply_filters( 'current_theme', get_option( 'current_theme' ) ) || 'Avada' == apply_filters( 'current_theme', get_option( 'current_theme' ) ) ) ) {
|
597 |
+
|
598 |
+
add_action( 'wp_enqueue_scripts', 'enqueueScriptsforAvada', -1 );
|
599 |
+
|
600 |
+
if( ! function_exists( 'enqueueScriptsforAvada' ) ) {
|
601 |
+
function enqueueScriptsforAvada() {
|
602 |
+
|
603 |
+
wp_register_style( 'ez-toc-avada', '', array( 'ez-toc' ), ezTOC::VERSION );
|
604 |
+
wp_enqueue_style( 'ez-toc-avada' );
|
605 |
+
$inlineCSSAvada = <<<INLINECSSAVADA
|
606 |
+
.sidebar .fusion-sidebar-inner-content #ez-toc-container nav {
|
607 |
+
overflow-y: scroll;
|
608 |
+
height: auto;
|
609 |
+
max-height: 35vh;
|
610 |
+
padding-bottom: 60px;
|
611 |
+
}\n\n
|
612 |
+
INLINECSSAVADA;
|
613 |
+
wp_add_inline_style( 'ez-toc-avada', $inlineCSSAvada );
|
614 |
+
}
|
615 |
+
}
|
616 |
}
|
includes/inc.string-functions.php
CHANGED
@@ -354,4 +354,22 @@ function mb_find_replace( &$find = false, &$replace = false, &$string = '' ) {
|
|
354 |
|
355 |
return $string;
|
356 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
endif;
|
354 |
|
355 |
return $string;
|
356 |
}
|
357 |
+
endif;
|
358 |
+
|
359 |
+
if( ! function_exists( __NAMESPACE__ . '\insertElementByPTag' ) ):
|
360 |
+
/**
|
361 |
+
* insertElementByPTag Method
|
362 |
+
*
|
363 |
+
* @since 2.0.36
|
364 |
+
* @param $content
|
365 |
+
* @param $toc
|
366 |
+
* @return false|string
|
367 |
+
* @throws \DOMException
|
368 |
+
*/
|
369 |
+
function insertElementByPTag($content, $toc)
|
370 |
+
{
|
371 |
+
$find = array('</p>');
|
372 |
+
$replace = array('</p>' . $toc);
|
373 |
+
return mb_find_replace( $find, $replace, $content );
|
374 |
+
}
|
375 |
endif;
|