Version Description
10/29/2022 = * BUG: TOC shows on reload even if is closed #322 * BUG: Sticky Toggle TOC Container is showing in footer on disabled TOC #317 * BUG: wp-content/plugins/easy-table-of-contents/vendor/icomoon/fonts/ez-toc-icomoon.eot #308 * BUG: Second line of heading should equally align to first line, If the heading is large #307 * BUG: Some bugs occurring due to a "-" in pages created with Elementor #306 * BUG: Not working in Persian Language. duplicate #303 * NEW: get it listed on https://amp-wp.org/ecosystem/ #302 * BUG: TOC Pro Elementor block bugs. #298 * BUG: Not working in sidebar if Auto insert is disabled. #297 * TWEAK: Move TOC Pro setting section to TOC Pro plugin #296 * BUG/TWEAK: Audit the PRO version #277 * BUG/TWEAK: Need to audit and fix Fixed TOC feature in pro #276 * BUG: Shortcode are not working with Salient theme #271 * BUG: While using the WP Bakery page builder, in the custom heading module, TOC is not working. #205
Release Info
Developer | magazine3 |
Plugin | Easy Table of Contents |
Version | 2.0.35 |
Comparing to | |
See all releases |
Code changes from version 2.0.34 to 2.0.35
- README.txt +17 -1
- assets/css/ez-toc-sticky.css +3 -18
- assets/css/ez-toc-sticky.min.css +1 -1
- assets/css/screen.css +28 -18
- assets/css/screen.min.css +1 -1
- assets/js/eztoc-admin.js +16 -1
- assets/js/front.js +1 -1
- assets/js/front.min.js +1 -1
- easy-table-of-contents.php +109 -12
- includes/class.options.php +7 -32
- includes/class.post.php +33 -16
- includes/class.widget-toc.php +1 -1
- includes/inc.admin-options-page.php +4 -2
- includes/inc.functions.php +2 -2
- includes/inc.string-functions.php +59 -1
- vendor/icomoon/fonts/ez-toc-icomoon.eot +0 -0
- vendor/icomoon/fonts/ez-toc-icomoon.svg +0 -11
- vendor/icomoon/fonts/ez-toc-icomoon.ttf +0 -0
- vendor/icomoon/fonts/ez-toc-icomoon.woff +0 -0
- vendor/icomoon/fonts/ez-toc-icomoon.woff2 +0 -0
- vendor/icomoon/selection.json +0 -75
- vendor/icomoon/style.css +0 -33
- vendor/icomoon/style.min.css +0 -1
@@ -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,22 @@ 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.34 09/29/2022 =
|
109 |
* BUG: Enabling sticky toggle makes the other links unclickable. #301
|
110 |
* BUG: Need to fix Pro Settings #300
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.6.20
|
8 |
+
Stable tag: 2.0.35
|
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.35 10/29/2022 =
|
109 |
+
* BUG: TOC shows on reload even if is closed #322
|
110 |
+
* BUG: Sticky Toggle TOC Container is showing in footer on disabled TOC #317
|
111 |
+
* BUG: wp-content/plugins/easy-table-of-contents/vendor/icomoon/fonts/ez-toc-icomoon.eot #308
|
112 |
+
* BUG: Second line of heading should equally align to first line, If the heading is large #307
|
113 |
+
* BUG: Some bugs occurring due to a "-" in pages created with Elementor #306
|
114 |
+
* BUG: Not working in Persian Language. duplicate #303
|
115 |
+
* NEW: get it listed on https://amp-wp.org/ecosystem/ #302
|
116 |
+
* BUG: TOC Pro Elementor block bugs. #298
|
117 |
+
* BUG: Not working in sidebar if Auto insert is disabled. #297
|
118 |
+
* TWEAK: Move TOC Pro setting section to TOC Pro plugin #296
|
119 |
+
* BUG/TWEAK: Audit the PRO version #277
|
120 |
+
* BUG/TWEAK: Need to audit and fix Fixed TOC feature in pro #276
|
121 |
+
* BUG: Shortcode are not working with Salient theme #271
|
122 |
+
* BUG: While using the WP Bakery page builder, in the custom heading module, TOC is not working. #205
|
123 |
+
|
124 |
= 2.0.34 09/29/2022 =
|
125 |
* BUG: Enabling sticky toggle makes the other links unclickable. #301
|
126 |
* BUG: Need to fix Pro Settings #300
|
@@ -128,6 +128,9 @@ div.ez-toc-sticky-widget-container li {
|
|
128 |
box-shadow: none;
|
129 |
text-decoration: none;
|
130 |
text-shadow: none;
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
#ez-toc-sticky-container a:visited {
|
@@ -305,24 +308,6 @@ div.ez-toc-sticky-widget-container li {
|
|
305 |
margin-left: 2px;
|
306 |
}
|
307 |
|
308 |
-
[class*="ez-toc-sticky-icon-"] {
|
309 |
-
font-family: 'ez-toc-sticky-icomoon' !important; /* For better glyphicon compatibility */
|
310 |
-
speak: none;
|
311 |
-
font-style: normal;
|
312 |
-
font-weight: normal;
|
313 |
-
font-variant: normal;
|
314 |
-
text-transform: none;
|
315 |
-
line-height: 1;
|
316 |
-
|
317 |
-
/* Better Font Rendering =========== */
|
318 |
-
-webkit-font-smoothing: antialiased;
|
319 |
-
-moz-osx-font-smoothing: grayscale;
|
320 |
-
}
|
321 |
-
|
322 |
-
.ez-toc-sticky-icon-toggle:before {
|
323 |
-
content: "\e87a";
|
324 |
-
}
|
325 |
-
|
326 |
#ez-toc-sticky-container input {
|
327 |
position: absolute;
|
328 |
left: -999em;
|
128 |
box-shadow: none;
|
129 |
text-decoration: none;
|
130 |
text-shadow: none;
|
131 |
+
display: inline-flex;
|
132 |
+
align-items: stretch;
|
133 |
+
flex-wrap: nowrap;
|
134 |
}
|
135 |
|
136 |
#ez-toc-sticky-container a:visited {
|
308 |
margin-left: 2px;
|
309 |
}
|
310 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
#ez-toc-sticky-container input {
|
312 |
position: absolute;
|
313 |
left: -999em;
|
@@ -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}#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-
|
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}div#ez-toc-sticky-container.afterpara+p,label.cssiconcheckbox{display:none}.ez-toc-sticky-widget-container ul li a{padding-left:10px}
|
@@ -111,6 +111,9 @@ div.ez-toc-widget-container li {
|
|
111 |
box-shadow: none;
|
112 |
text-decoration: none;
|
113 |
text-shadow: none;
|
|
|
|
|
|
|
114 |
}
|
115 |
|
116 |
#ez-toc-container a:visited {
|
@@ -129,7 +132,10 @@ div.ez-toc-widget-container li {
|
|
129 |
color: #FFF;
|
130 |
}
|
131 |
|
|
|
132 |
#ez-toc-container a.ez-toc-toggle {
|
|
|
|
|
133 |
color: #444444;
|
134 |
}
|
135 |
|
@@ -270,6 +276,10 @@ div.ez-toc-widget-container li {
|
|
270 |
margin-left: 10px;
|
271 |
}
|
272 |
|
|
|
|
|
|
|
|
|
273 |
.ez-toc-glyphicon {
|
274 |
position: relative;
|
275 |
top: 1px;
|
@@ -291,22 +301,6 @@ div.ez-toc-widget-container li {
|
|
291 |
margin-left: 2px;
|
292 |
}
|
293 |
|
294 |
-
[class*="ez-toc-icon-"] {
|
295 |
-
font-family: 'ez-toc-icomoon' !important;
|
296 |
-
speak: none;
|
297 |
-
font-style: normal;
|
298 |
-
font-weight: normal;
|
299 |
-
font-variant: normal;
|
300 |
-
text-transform: none;
|
301 |
-
line-height: 1;
|
302 |
-
-webkit-font-smoothing: antialiased;
|
303 |
-
-moz-osx-font-smoothing: grayscale;
|
304 |
-
}
|
305 |
-
|
306 |
-
.ez-toc-icon-toggle:before {
|
307 |
-
content: "\e87a";
|
308 |
-
}
|
309 |
-
|
310 |
#ez-toc-container input {
|
311 |
position: absolute;
|
312 |
left: -999em;
|
@@ -325,10 +319,23 @@ div.ez-toc-widget-container li {
|
|
325 |
left: 3px;
|
326 |
font-size: 16px;
|
327 |
/* background: #f9efef; */
|
328 |
-
padding:
|
329 |
border: 1px solid #999191;
|
330 |
border-radius: 5px;
|
331 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
}
|
333 |
|
334 |
div#ez-toc-container p.ez-toc-title {
|
@@ -372,7 +379,10 @@ div#ez-toc-container.afterpara + p {
|
|
372 |
}
|
373 |
|
374 |
.ez-toc-widget-container ul li a {
|
375 |
-
padding-left: 10px
|
|
|
|
|
|
|
376 |
}
|
377 |
|
378 |
.ez-toc-widget-container ul.ez-toc-list li.active {
|
111 |
box-shadow: none;
|
112 |
text-decoration: none;
|
113 |
text-shadow: none;
|
114 |
+
display: inline-flex;
|
115 |
+
align-items: stretch;
|
116 |
+
flex-wrap: nowrap;
|
117 |
}
|
118 |
|
119 |
#ez-toc-container a:visited {
|
132 |
color: #FFF;
|
133 |
}
|
134 |
|
135 |
+
|
136 |
#ez-toc-container a.ez-toc-toggle {
|
137 |
+
display: flex;
|
138 |
+
align-items: center;
|
139 |
color: #444444;
|
140 |
}
|
141 |
|
276 |
margin-left: 10px;
|
277 |
}
|
278 |
|
279 |
+
#ez-toc-container label.cssicon {
|
280 |
+
height: 30px;
|
281 |
+
}
|
282 |
+
|
283 |
.ez-toc-glyphicon {
|
284 |
position: relative;
|
285 |
top: 1px;
|
301 |
margin-left: 2px;
|
302 |
}
|
303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
#ez-toc-container input {
|
305 |
position: absolute;
|
306 |
left: -999em;
|
319 |
left: 3px;
|
320 |
font-size: 16px;
|
321 |
/* background: #f9efef; */
|
322 |
+
padding: 0 4px 0 5px;
|
323 |
border: 1px solid #999191;
|
324 |
border-radius: 5px;
|
325 |
cursor: pointer;
|
326 |
+
width: 30px;
|
327 |
+
}
|
328 |
+
|
329 |
+
#ez-toc-container .ez-toc-toggle label, #ez-toc-container label.cssicon {
|
330 |
+
float: right;
|
331 |
+
position: relative;
|
332 |
+
font-size: 16px;
|
333 |
+
padding: 0;
|
334 |
+
border: 1px solid #999191;
|
335 |
+
border-radius: 5px;
|
336 |
+
cursor: pointer;
|
337 |
+
left: 10px;
|
338 |
+
width: 35px;
|
339 |
}
|
340 |
|
341 |
div#ez-toc-container p.ez-toc-title {
|
379 |
}
|
380 |
|
381 |
.ez-toc-widget-container ul li a {
|
382 |
+
padding-left: 10px;
|
383 |
+
display: inline-flex;
|
384 |
+
align-items: stretch;
|
385 |
+
flex-wrap: nowrap;
|
386 |
}
|
387 |
|
388 |
.ez-toc-widget-container ul.ez-toc-list li.active {
|
@@ -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-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}#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{
|
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}div#ez-toc-container.afterpara+p,label.cssiconcheckbox{display:none}.ez-toc-widget-container ul li a{padding-left:10px;display:inline-flex;align-items:stretch;flex-wrap:nowrap}
|
@@ -96,4 +96,19 @@ jQuery(document).ready(function ($) {
|
|
96 |
}
|
97 |
);
|
98 |
});
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
);
|
98 |
});
|
99 |
+
|
100 |
+
|
101 |
+
$('.eztoc-set-pos-btn').hide();
|
102 |
+
$("[name='ez-toc-settings[fixedtoc]']").on('click', function (e) {
|
103 |
+
if($(this).is(':checked'))
|
104 |
+
{
|
105 |
+
$('.eztoc-set-pos-btn').show();
|
106 |
+
console.log('checkbox checked');
|
107 |
+
}
|
108 |
+
else{
|
109 |
+
$('.eztoc-set-pos-btn').hide();
|
110 |
+
console.log('checkbox unchecked');
|
111 |
+
}
|
112 |
+
});
|
113 |
+
});
|
114 |
+
|
@@ -129,7 +129,7 @@ jQuery( function( $ ) {
|
|
129 |
var toggle = $( 'a.ez-toc-toggle' );
|
130 |
var invert = ezTOC.visibility_hide_by_default;
|
131 |
|
132 |
-
toggle.css( 'display', '
|
133 |
|
134 |
if ( Cookies ) {
|
135 |
|
129 |
var toggle = $( 'a.ez-toc-toggle' );
|
130 |
var invert = ezTOC.visibility_hide_by_default;
|
131 |
|
132 |
+
toggle.css( 'display', 'flex' );
|
133 |
|
134 |
if ( Cookies ) {
|
135 |
|
@@ -1 +1 @@
|
|
1 |
-
jQuery(
|
1 |
+
jQuery(function(t){if("undefined"!=typeof ezTOC){function e(){if(0!==t(".ez-toc-widget-container.ez-toc-affix").length){var e=30;void 0!==ezTOC.scroll_offset&&(e=parseInt(ezTOC.scroll_offset)),t(ezTOC.affixSelector).stick_in_parent({inner_scrolling:!1,offset_top:e})}if(t.fn.shrinkTOCWidth=function(){t(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&t(this).css("width","")},1===parseInt(ezTOC.smooth_scroll)&&t("a.ez-toc-link").on("click",function(){var e=t(this),i="",o=e.prop("hostname"),a=e.prop("pathname"),s=e.prop("search"),l=e.prop("hash");if(a.length>0&&"/"!==a.charAt(0)&&(a="/"+a),window.location.hostname===o&&window.location.pathname===a&&window.location.search===s&&""!==l){if(0===t(i='[id="'+l.replace("#","")+'"]').length&&(console.log("ezTOC scrollTarget Not Found: "+i),i=""),void 0!==ezTOC.scroll_offset)var c=-1*ezTOC.scroll_offset;else{var n=t("#wpadminbar");c=n.length>0&&n.is(":visible")?-30:0}i&&t.smoothScroll({scrollTarget:i,offset:c,beforeScroll:u,afterScroll:function(){p(),v()}})}}),void 0!==ezTOC.visibility_hide_by_default){var i=t("ul.ez-toc-list"),o=t("a.ez-toc-toggle"),a=ezTOC.visibility_hide_by_default,s="ezTOC_hidetoc";o.css("display","flex"),Cookies?(1==Cookies.get("ezTOC_hidetoc")?o.data("visible",!1):o.data("visible",!0),Cookies.remove("ezTOC_hidetoc")):(o.data("visible",!0),document.cookie=s+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"),a&&o.data("visible",!1),o.data("visible")||i.hide(),o.on("click",function(e){e.preventDefault();let o=document.querySelector("#ez-toc-container");if(o)o.classList.toggle("toc_close");else{let s=document.querySelector(".ez-toc-widget-container");s.classList.toggle("toc_close")}t(this).data("visible")?(t(this).data("visible",!1),Cookies&&(a?Cookies.set("ezTOC_hidetoc",null,{path:"/"}):Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"})),i.hide("fast")):(t(this).data("visible",!0),Cookies&&(a?Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"}):Cookies.set("ezTOC_hidetoc",null,{path:"/"})),i.show("fast"))})}var l,c,n,r=t("span.ez-toc-section").toArray(),h=(l=r,l.reduce(function(e,i){var o;return e[i.id]=t('.ez-toc-widget-container .ez-toc-list a[href="#'+t(o=i).attr("id")+'"]'),e},{})),f=t.map(h,function(t,e){return t}),d=(c=5,void 0!==ezTOC.smooth_scroll&&1===parseInt(ezTOC.smooth_scroll)&&(c=void 0!==ezTOC.scroll_offset?parseInt(ezTOC.scroll_offset):30),n=t("#wpadminbar"),n.length&&(c+=n.height()),c);function p(){var e,i,o,a,s,l=(e=d,i=r,o=t(window).scrollTop()+e+1,a=i[0],s=o-t(a).offset().top,i.forEach(function(e){var i=o-t(e).offset().top;i>0&&i<s&&(s=i,a=e)}),a);if(l){var c,n,p,v,u,g,$,z,b,m=h[l.id];(function t(e,i){i.forEach(function(t){e!==t&&t.parent().hasClass("active")&&t.parent().removeClass("active")})})(m,f),(p=(c=m).parent()).hasClass("active")||p.addClass("active"),b=(v=n=p,u=t(v),g=u.html(),u.parent().append('<li id="ez-toc-height-test" class="active">'+g+"</li>"),$=t("#ez-toc-height-test"),z=$.height(),$.remove(),z-u.children("ul").first().height()),t("#ez-toc-active-height").remove(),t('<style id="ez-toc-active-height">.ez-toc-widget-container ul.ez-toc-list li.active {height:'+b+"px;} </style>").appendTo("head")}}function v(){r.length>0&&t(".ez-toc-widget-container").length&&t(window).on("load resize scroll",p)}function u(){t(window).off("load resize scroll",p)}v()}ezTOC.init=function(){e()},e()}function i(t,e){document.cookie=t+"="+e+"; Path=/;"}});
|
@@ -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,7 +26,7 @@
|
|
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;
|
@@ -48,7 +48,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.
|
@@ -151,6 +151,11 @@ if ( ! class_exists( 'ezTOC' ) ) {
|
|
151 |
private static function hooks() {
|
152 |
|
153 |
//add_action( 'plugins_loaded', array( __CLASS__, 'loadTextdomain' ) );
|
|
|
|
|
|
|
|
|
|
|
154 |
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueueScripts' ) );
|
155 |
add_action('admin_head', array( __CLASS__, 'addEditorButton' ));
|
156 |
|
@@ -162,6 +167,7 @@ if ( ! class_exists( 'ezTOC' ) ) {
|
|
162 |
add_shortcode( apply_filters( 'ez_toc_shortcode', 'toc' ), array( __CLASS__, 'shortcode' ) );
|
163 |
|
164 |
}
|
|
|
165 |
}
|
166 |
|
167 |
/**
|
@@ -240,15 +246,24 @@ if ( ! class_exists( 'ezTOC' ) ) {
|
|
240 |
|
241 |
$js_vars = array();
|
242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
$isEligible = self::is_eligible( get_post() );
|
244 |
|
245 |
-
if ( ! $isEligible && ! is_active_widget( false, false, 'ezw_tco' ) ) {
|
246 |
return false;
|
247 |
}
|
248 |
|
249 |
-
wp_register_style( 'ez-icomoon', EZ_TOC_URL . "vendor/icomoon/style$min.css", array(), ezTOC::VERSION );
|
250 |
if (!ezTOC_Option::get( 'inline_css' )) {
|
251 |
-
wp_register_style( 'ez-toc', EZ_TOC_URL . "assets/css/screen$min.css",
|
|
|
|
|
252 |
}
|
253 |
wp_register_script( 'ez-toc-js-cookie', EZ_TOC_URL . "vendor/js-cookie/js.cookie$min.js", array(), '2.2.1', TRUE );
|
254 |
wp_register_script( 'ez-toc-jquery-smooth-scroll', EZ_TOC_URL . "vendor/smooth-scroll/jquery.smooth-scroll$min.js", array( 'jquery' ), '2.2.0', TRUE );
|
@@ -274,7 +289,7 @@ if ( ! class_exists( 'ezTOC' ) ) {
|
|
274 |
wp_register_style(
|
275 |
'ez-toc-sticky',
|
276 |
EZ_TOC_URL . "assets/css/ez-toc-sticky{$min}.css",
|
277 |
-
array( 'ez-icomoon' ),
|
278 |
self::VERSION
|
279 |
);
|
280 |
wp_enqueue_style( 'ez-toc-sticky' );
|
@@ -317,8 +332,60 @@ if ( ! class_exists( 'ezTOC' ) ) {
|
|
317 |
|
318 |
wp_localize_script( 'ez-toc-js', 'ezTOC', $js_vars );
|
319 |
}
|
|
|
|
|
|
|
|
|
320 |
}
|
321 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
/**
|
323 |
* Prints out inline CSS after the core CSS file to allow overriding core styles via options.
|
324 |
*
|
@@ -459,6 +526,8 @@ INLINECSS;
|
|
459 |
content: counters(item, ".", $list_type) ". ";
|
460 |
display: inline-block;
|
461 |
counter-increment: item;
|
|
|
|
|
462 |
$marginCSS \n
|
463 |
$floatPosition
|
464 |
}\n\n
|
@@ -479,6 +548,8 @@ INLINECSS;
|
|
479 |
content: counter(item, $list_type) "$content";
|
480 |
$marginCSS
|
481 |
counter-increment: item;
|
|
|
|
|
482 |
$floatPosition
|
483 |
}\n\n
|
484 |
INLINECSS;
|
@@ -590,6 +661,8 @@ COUNTERINCREMENTCSS;
|
|
590 |
content: $items ". ";
|
591 |
float: right;
|
592 |
margin-left: 0.2rem;
|
|
|
|
|
593 |
}\n\n
|
594 |
COUNTERINCREMENTCSS;
|
595 |
}
|
@@ -636,7 +709,6 @@ COUNTERINCREMENTCSS;
|
|
636 |
position: relative;
|
637 |
top: auto;
|
638 |
width: auto !important;
|
639 |
-
{$custom_width}
|
640 |
height: 100%;
|
641 |
box-shadow: 1px 1px 10px 3px rgb(0 0 0 / 20%);
|
642 |
box-sizing: border-box;
|
@@ -969,10 +1041,10 @@ INLINESTICKYTOGGLEJS;
|
|
969 |
*/
|
970 |
public static function shortcode( $atts, $content, $tag ) {
|
971 |
|
972 |
-
static $run = true;
|
973 |
$html = '';
|
974 |
|
975 |
-
if ( $
|
976 |
|
977 |
$post = self::get( get_the_ID() );
|
978 |
|
@@ -984,7 +1056,15 @@ INLINESTICKYTOGGLEJS;
|
|
984 |
}
|
985 |
|
986 |
$html = $post->getTOC();
|
987 |
-
$run = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
988 |
}
|
989 |
if (isset($atts["initial_view"]) && !empty($atts["initial_view"]) && $atts["initial_view"] == 'hide') {
|
990 |
$html = preg_replace('/class="ez-toc-list ez-toc-list-level-1"/', 'class="ez-toc-list ez-toc-list-level-1" style="display:none"', $html);
|
@@ -1065,7 +1145,7 @@ INLINESTICKYTOGGLEJS;
|
|
1065 |
$isEligible = apply_filters('eztoc_do_shortcode',$isEligible);
|
1066 |
Debug::log( 'post_eligible', 'Post eligible.', $isEligible );
|
1067 |
|
1068 |
-
if ( ! $isEligible && ! is_active_widget( false, false, 'ezw_tco' ) ) {
|
1069 |
|
1070 |
return Debug::log()->appendTo( $content );
|
1071 |
}
|
@@ -1269,6 +1349,23 @@ STICKYTOGGLEHTML;
|
|
1269 |
return $plugin_array;
|
1270 |
}
|
1271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1272 |
}
|
1273 |
|
1274 |
/**
|
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.35
|
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.35
|
30 |
*/
|
31 |
|
32 |
use Easy_Plugins\Table_Of_Contents\Debug;
|
48 |
* @since 1.0
|
49 |
* @var string
|
50 |
*/
|
51 |
+
const VERSION = '2.0.35';
|
52 |
|
53 |
/**
|
54 |
* Stores the instance of this class.
|
151 |
private static function hooks() {
|
152 |
|
153 |
//add_action( 'plugins_loaded', array( __CLASS__, 'loadTextdomain' ) );
|
154 |
+
add_option('ez-toc-shortcode-exist-and-render', false);
|
155 |
+
if ( in_array( 'js_composer_salient/js_composer.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
156 |
+
add_option( 'ez-toc-post-meta-content', '' );
|
157 |
+
}
|
158 |
+
|
159 |
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueueScripts' ) );
|
160 |
add_action('admin_head', array( __CLASS__, 'addEditorButton' ));
|
161 |
|
167 |
add_shortcode( apply_filters( 'ez_toc_shortcode', 'toc' ), array( __CLASS__, 'shortcode' ) );
|
168 |
|
169 |
}
|
170 |
+
|
171 |
}
|
172 |
|
173 |
/**
|
246 |
|
247 |
$js_vars = array();
|
248 |
|
249 |
+
if ( in_array( 'js_composer_salient/js_composer.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
250 |
+
$postMetaContent = get_post_meta( get_the_ID(), '_nectar_portfolio_extra_content',
|
251 |
+
true );
|
252 |
+
if( !empty( $postMetaContent ) )
|
253 |
+
update_option( 'ez-toc-post-meta-content', do_shortcode( $postMetaContent ) );
|
254 |
+
}
|
255 |
+
|
256 |
$isEligible = self::is_eligible( get_post() );
|
257 |
|
258 |
+
if ( ! $isEligible && ! is_active_widget( false, false, 'ezw_tco' ) && ! get_option( 'ez-toc-shortcode-exist-and-render' ) ) {
|
259 |
return false;
|
260 |
}
|
261 |
|
262 |
+
// wp_register_style( 'ez-icomoon', EZ_TOC_URL . "vendor/icomoon/style$min.css", array(), ezTOC::VERSION );
|
263 |
if (!ezTOC_Option::get( 'inline_css' )) {
|
264 |
+
wp_register_style( 'ez-toc', EZ_TOC_URL . "assets/css/screen$min.css",
|
265 |
+
// array( 'ez-icomoon' ),
|
266 |
+
ezTOC::VERSION );
|
267 |
}
|
268 |
wp_register_script( 'ez-toc-js-cookie', EZ_TOC_URL . "vendor/js-cookie/js.cookie$min.js", array(), '2.2.1', TRUE );
|
269 |
wp_register_script( 'ez-toc-jquery-smooth-scroll', EZ_TOC_URL . "vendor/smooth-scroll/jquery.smooth-scroll$min.js", array( 'jquery' ), '2.2.0', TRUE );
|
289 |
wp_register_style(
|
290 |
'ez-toc-sticky',
|
291 |
EZ_TOC_URL . "assets/css/ez-toc-sticky{$min}.css",
|
292 |
+
// array( 'ez-icomoon' ),
|
293 |
self::VERSION
|
294 |
);
|
295 |
wp_enqueue_style( 'ez-toc-sticky' );
|
332 |
|
333 |
wp_localize_script( 'ez-toc-js', 'ezTOC', $js_vars );
|
334 |
}
|
335 |
+
|
336 |
+
if ( in_array( 'js_composer/js_composer.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
337 |
+
self::inlineWPBakeryJS();
|
338 |
+
}
|
339 |
}
|
340 |
|
341 |
+
/**
|
342 |
+
* inlineWPBakeryJS Method
|
343 |
+
* Javascript code for WP Bakery Plugin issue for mobile screen
|
344 |
+
*
|
345 |
+
* @since 2.0.35
|
346 |
+
* @static
|
347 |
+
* @uses \wp_add_inline_script()
|
348 |
+
* @return void
|
349 |
+
*
|
350 |
+
* ez-toc-list ez-toc-link
|
351 |
+
* ez-toc-section
|
352 |
+
*/
|
353 |
+
private static function inlineWPBakeryJS()
|
354 |
+
{
|
355 |
+
$stickyJS = '';
|
356 |
+
|
357 |
+
if( wp_is_mobile() )
|
358 |
+
{
|
359 |
+
$stickyJS = <<<INLINESTICKJSFORMOBILE
|
360 |
+
let ezTocStickyContainer = document.querySelector('#ez-toc-sticky-container');
|
361 |
+
if(document.querySelectorAll('#ez-toc-sticky-container').length > 0) {
|
362 |
+
let ezTocStickyContainerUL = ezTocStickyContainer.querySelectorAll('.ez-toc-link');
|
363 |
+
for(let i = 0; i < ezTocStickyContainerUL.length; i++) {
|
364 |
+
let anchorHREF = ezTocStickyContainerUL[i].getAttribute('href');
|
365 |
+
ezTocStickyContainerUL[i].setAttribute('href', anchorHREF + '-' + uniqID);
|
366 |
+
}
|
367 |
+
}
|
368 |
+
INLINESTICKJSFORMOBILE;
|
369 |
+
}
|
370 |
+
$inlineWPBakeryJS = <<<INLINEWPBAKERYJS
|
371 |
+
let mobileContainer = document.querySelector("#mobile.vc_row-fluid");
|
372 |
+
if(document.querySelectorAll("#mobile.vc_row-fluid").length > 0) {
|
373 |
+
let ezTocContainerUL = mobileContainer.querySelectorAll('.ez-toc-link');
|
374 |
+
let uniqID = 'xs-sm-' + Math.random().toString(16).slice(2);
|
375 |
+
for(let i = 0; i < ezTocContainerUL.length; i++) {
|
376 |
+
let anchorHREF = ezTocContainerUL[i].getAttribute('href');
|
377 |
+
mobileContainer.querySelector("span.ez-toc-section"+ anchorHREF).setAttribute('id', anchorHREF.replace
|
378 |
+
('#','') + '-' +
|
379 |
+
uniqID);
|
380 |
+
ezTocContainerUL[i].setAttribute('href', anchorHREF + '-' + uniqID);
|
381 |
+
}
|
382 |
+
$stickyJS
|
383 |
+
|
384 |
+
}
|
385 |
+
INLINEWPBAKERYJS;
|
386 |
+
wp_add_inline_script( 'ez-toc-js', $inlineWPBakeryJS );
|
387 |
+
}
|
388 |
+
|
389 |
/**
|
390 |
* Prints out inline CSS after the core CSS file to allow overriding core styles via options.
|
391 |
*
|
526 |
content: counters(item, ".", $list_type) ". ";
|
527 |
display: inline-block;
|
528 |
counter-increment: item;
|
529 |
+
flex-grow: 0;
|
530 |
+
flex-shrink: 0;
|
531 |
$marginCSS \n
|
532 |
$floatPosition
|
533 |
}\n\n
|
548 |
content: counter(item, $list_type) "$content";
|
549 |
$marginCSS
|
550 |
counter-increment: item;
|
551 |
+
flex-grow: 0;
|
552 |
+
flex-shrink: 0;
|
553 |
$floatPosition
|
554 |
}\n\n
|
555 |
INLINECSS;
|
661 |
content: $items ". ";
|
662 |
float: right;
|
663 |
margin-left: 0.2rem;
|
664 |
+
flex-grow: 0;
|
665 |
+
flex-shrink: 0;
|
666 |
}\n\n
|
667 |
COUNTERINCREMENTCSS;
|
668 |
}
|
709 |
position: relative;
|
710 |
top: auto;
|
711 |
width: auto !important;
|
|
|
712 |
height: 100%;
|
713 |
box-shadow: 1px 1px 10px 3px rgb(0 0 0 / 20%);
|
714 |
box-sizing: border-box;
|
1041 |
*/
|
1042 |
public static function shortcode( $atts, $content, $tag ) {
|
1043 |
|
1044 |
+
// static $run = true;
|
1045 |
$html = '';
|
1046 |
|
1047 |
+
if ( 'ez-toc' == $tag ) {
|
1048 |
|
1049 |
$post = self::get( get_the_ID() );
|
1050 |
|
1056 |
}
|
1057 |
|
1058 |
$html = $post->getTOC();
|
1059 |
+
// $run = false;
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
if( !empty( $html ) )
|
1063 |
+
{
|
1064 |
+
update_option('ez-toc-shortcode-exist-and-render', true);
|
1065 |
+
} else
|
1066 |
+
{
|
1067 |
+
update_option('ez-toc-shortcode-exist-and-render', false);
|
1068 |
}
|
1069 |
if (isset($atts["initial_view"]) && !empty($atts["initial_view"]) && $atts["initial_view"] == 'hide') {
|
1070 |
$html = preg_replace('/class="ez-toc-list ez-toc-list-level-1"/', 'class="ez-toc-list ez-toc-list-level-1" style="display:none"', $html);
|
1145 |
$isEligible = apply_filters('eztoc_do_shortcode',$isEligible);
|
1146 |
Debug::log( 'post_eligible', 'Post eligible.', $isEligible );
|
1147 |
|
1148 |
+
if ( ! $isEligible && ! is_active_widget( false, false, 'ezw_tco' ) && ! get_option( 'ez-toc-shortcode-exist-and-render' ) ) {
|
1149 |
|
1150 |
return Debug::log()->appendTo( $content );
|
1151 |
}
|
1349 |
return $plugin_array;
|
1350 |
}
|
1351 |
|
1352 |
+
/**
|
1353 |
+
* getTOCToggleIcon Method
|
1354 |
+
* @access public
|
1355 |
+
* @since 2.0.35
|
1356 |
+
* @static
|
1357 |
+
* @return string
|
1358 |
+
*/
|
1359 |
+
public static function getTOCToggleIcon()
|
1360 |
+
{
|
1361 |
+
$iconColor = '#000000';
|
1362 |
+
if( ezTOC_Option::get( 'custom_title_colour' ) )
|
1363 |
+
{
|
1364 |
+
$iconColor = ezTOC_Option::get( 'custom_title_colour' );
|
1365 |
+
}
|
1366 |
+
return '<span style="display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;"><svg style="fill: ' . esc_attr($iconColor, 'easy-table-of-contents') . ';color:' . esc_attr($iconColor, 'easy-table-of-contents') . '" xmlns="http://www.w3.org/2000/svg" class="list-377408" width="20px" height="20px" viewBox="0 0 24 24" fill="none"><path d="M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z" fill="currentColor"></path></svg><svg style="fill: ' . esc_attr($iconColor, 'easy-table-of-contents') . ';color:' . esc_attr($iconColor, 'easy-table-of-contents') . '" class="arrow-unsorted-368013" xmlns="http://www.w3.org/2000/svg" width="10px" height="10px" viewBox="0 0 24 24" version="1.2" baseProfile="tiny"><path d="M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z"/></svg></span>';
|
1367 |
+
}
|
1368 |
+
|
1369 |
}
|
1370 |
|
1371 |
/**
|
@@ -155,7 +155,12 @@ if ( ! class_exists( 'ezTOC_Option' ) ) {
|
|
155 |
* @return array
|
156 |
*/
|
157 |
private static function getRegistered() {
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
159 |
$options = array(
|
160 |
'general' => apply_filters(
|
161 |
'ez_toc_settings_general',
|
@@ -721,37 +726,7 @@ if ( ! class_exists( 'ezTOC_Option' ) ) {
|
|
721 |
)
|
722 |
),
|
723 |
'prosettings' => apply_filters(
|
724 |
-
'ez_toc_settings_prosettings',
|
725 |
-
array(
|
726 |
-
'exclude_by_class' => array(
|
727 |
-
'id' => 'exclude_by_class',
|
728 |
-
'name' => __( 'Exclude Headings by Class', 'easy-table-of-contents' ),
|
729 |
-
'desc' => '<br/>' . __( 'You can hide the TOC heading by its class and if you want to hide multiple headings then please saparate them with a comma (,)', 'easy-table-of-contents' ),
|
730 |
-
'type' => 'text',
|
731 |
-
'default' => '',
|
732 |
-
),
|
733 |
-
'fixedtoc' => array(
|
734 |
-
'id' => 'fixedtoc',
|
735 |
-
'name' => __( 'Fixed TOC', 'easy-table-of-contents' ),
|
736 |
-
'desc' => __( 'Fixed TOC in the page display so it can be easier to navigate', 'easy-table-of-contents' ),
|
737 |
-
'type' => 'checkbox',
|
738 |
-
'default' => false,
|
739 |
-
),
|
740 |
-
'highlightheadings' => array(
|
741 |
-
'id' => 'highlightheadings',
|
742 |
-
'name' => __( 'Highlight TOC Headings ', 'easy-table-of-contents' ),
|
743 |
-
'desc' => __( 'Highlight TOC headings while scrolling ', 'easy-table-of-contents' ),
|
744 |
-
'type' => 'checkbox',
|
745 |
-
'default' => false,
|
746 |
-
),
|
747 |
-
'shrinkthewidth' => array(
|
748 |
-
'id' => 'shrinkthewidth',
|
749 |
-
'name' => __( 'Shrink the width', 'easy-table-of-contents' ),
|
750 |
-
'desc' => __( 'Shrink the width to the size of the title' ),
|
751 |
-
'type' => 'checkbox',
|
752 |
-
'default' => false,
|
753 |
-
),
|
754 |
-
)
|
755 |
),
|
756 |
);
|
757 |
|
155 |
* @return array
|
156 |
*/
|
157 |
private static function getRegistered() {
|
158 |
+
$eztoc_latest_link=home_url();
|
159 |
+
$args = array( 'numberposts' => '1');
|
160 |
+
$recent_posts = wp_get_recent_posts( $args );
|
161 |
+
foreach( $recent_posts as $recent ){
|
162 |
+
$eztoc_latest_link= add_query_arg( 'eztoc-edit-position', '', get_permalink($recent["ID"] ));
|
163 |
+
}
|
164 |
$options = array(
|
165 |
'general' => apply_filters(
|
166 |
'ez_toc_settings_general',
|
726 |
)
|
727 |
),
|
728 |
'prosettings' => apply_filters(
|
729 |
+
'ez_toc_settings_prosettings', array()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
730 |
),
|
731 |
);
|
732 |
|
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
use function Easy_Plugins\Table_Of_Contents\String\br2;
|
|
|
4 |
|
5 |
class ezTOC_Post {
|
6 |
|
@@ -260,10 +261,20 @@ class ezTOC_Post {
|
|
260 |
//
|
261 |
// require_once( EZ_TOC_PATH . '/includes/vendor/ultimate-web-scraper/tag_filter.php' );
|
262 |
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
|
264 |
-
$split = preg_split( '/<!--nextpage-->/msuU', $this->post->post_content );
|
265 |
$pages = array();
|
266 |
|
|
|
|
|
267 |
if ( is_array( $split ) ) {
|
268 |
|
269 |
$page = 1;
|
@@ -994,17 +1005,18 @@ class ezTOC_Post {
|
|
994 |
foreach ( $matches as $i => $match ) {
|
995 |
|
996 |
//$anchor = $matches[ $i ]['id'];
|
997 |
-
$headings[] = str_replace(
|
998 |
-
array(
|
999 |
-
$
|
1000 |
-
'</h' . $
|
1001 |
-
),
|
1002 |
-
array(
|
1003 |
-
'>',
|
1004 |
-
'</h' . $
|
1005 |
-
),
|
1006 |
-
$
|
1007 |
-
);
|
|
|
1008 |
}
|
1009 |
}
|
1010 |
|
@@ -1077,7 +1089,12 @@ class ezTOC_Post {
|
|
1077 |
$html .= $this->createTOC( $page, $attribute['headings'], $prefix );
|
1078 |
}
|
1079 |
|
1080 |
-
$
|
|
|
|
|
|
|
|
|
|
|
1081 |
}
|
1082 |
|
1083 |
return $html;
|
@@ -1274,7 +1291,7 @@ class ezTOC_Post {
|
|
1274 |
|
1275 |
if ( ezTOC_Option::get( 'visibility' ) ) {
|
1276 |
if (ezTOC_Option::get( 'toc_loading' ) != 'css') {
|
1277 |
-
$icon =
|
1278 |
if(function_exists('ez_toc_pro_activation_link')){
|
1279 |
$icon = apply_filters('ez_toc_modify_icon',$icon);
|
1280 |
}
|
@@ -1284,7 +1301,7 @@ class ezTOC_Post {
|
|
1284 |
if(ezTOC_Option::get('visibility_hide_by_default')==true){
|
1285 |
$toggle_view= "checked";
|
1286 |
}
|
1287 |
-
$html .= '<label for="item" class="cssicon"
|
1288 |
}
|
1289 |
}
|
1290 |
|
@@ -1297,7 +1314,7 @@ class ezTOC_Post {
|
|
1297 |
}else{
|
1298 |
$html .= '<div class="ez-toc-title-container">' . PHP_EOL;
|
1299 |
$html .= '<span class="ez-toc-title-toggle">';
|
1300 |
-
$html .= '<a class="ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle" style="display: none;"
|
1301 |
$html .= '</span>';
|
1302 |
$html .= '</div>' . PHP_EOL;
|
1303 |
}
|
1 |
<?php
|
2 |
|
3 |
use function Easy_Plugins\Table_Of_Contents\String\br2;
|
4 |
+
use function Easy_Plugins\Table_Of_Contents\String\ezTOC_FilterString;
|
5 |
|
6 |
class ezTOC_Post {
|
7 |
|
261 |
//
|
262 |
// require_once( EZ_TOC_PATH . '/includes/vendor/ultimate-web-scraper/tag_filter.php' );
|
263 |
//}
|
264 |
+
$content = $this->post->post_content;
|
265 |
+
|
266 |
+
if ( in_array( 'js_composer_salient/js_composer.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
267 |
+
if ( empty( $content ) ) {
|
268 |
+
$content = get_option( 'ez-toc-post-meta-content' );
|
269 |
+
} else {
|
270 |
+
$content .= get_option( 'ez-toc-post-meta-content' );
|
271 |
+
}
|
272 |
+
}
|
273 |
|
|
|
274 |
$pages = array();
|
275 |
|
276 |
+
$split = preg_split( '/<!--nextpage-->/msuU', $content );
|
277 |
+
|
278 |
if ( is_array( $split ) ) {
|
279 |
|
280 |
$page = 1;
|
1005 |
foreach ( $matches as $i => $match ) {
|
1006 |
|
1007 |
//$anchor = $matches[ $i ]['id'];
|
1008 |
+
// $headings[] = str_replace(
|
1009 |
+
// array(
|
1010 |
+
// $match[1], // start of heading
|
1011 |
+
// '</h' . $match[2] . '>' // end of heading
|
1012 |
+
// ),
|
1013 |
+
// array(
|
1014 |
+
// '>',
|
1015 |
+
// '</h' . $match[2] . '>'
|
1016 |
+
// ),
|
1017 |
+
// $str
|
1018 |
+
// );
|
1019 |
+
$headings[] = '>' . ezTOC_FilterString( $match[3] ) . '</h' . $match[2] . '>';
|
1020 |
}
|
1021 |
}
|
1022 |
|
1089 |
$html .= $this->createTOC( $page, $attribute['headings'], $prefix );
|
1090 |
}
|
1091 |
|
1092 |
+
$displayList = '';
|
1093 |
+
if( ezTOC_Option::get( 'visibility_hide_by_default' ) )
|
1094 |
+
{
|
1095 |
+
$displayList = "style='display:none'";
|
1096 |
+
}
|
1097 |
+
$html = "<ul class='{$prefix}-list {$prefix}-list-level-1' $displayList>" . $html . "</ul>";
|
1098 |
}
|
1099 |
|
1100 |
return $html;
|
1291 |
|
1292 |
if ( ezTOC_Option::get( 'visibility' ) ) {
|
1293 |
if (ezTOC_Option::get( 'toc_loading' ) != 'css') {
|
1294 |
+
$icon = ezTOC::getTOCToggleIcon();
|
1295 |
if(function_exists('ez_toc_pro_activation_link')){
|
1296 |
$icon = apply_filters('ez_toc_modify_icon',$icon);
|
1297 |
}
|
1301 |
if(ezTOC_Option::get('visibility_hide_by_default')==true){
|
1302 |
$toggle_view= "checked";
|
1303 |
}
|
1304 |
+
$html .= '<label for="item" class="cssicon">' . ezTOC::getTOCToggleIcon() . '</label><label for="item" class="cssiconcheckbox">1</label><input type="checkbox" id="item" '.$toggle_view.'>';
|
1305 |
}
|
1306 |
}
|
1307 |
|
1314 |
}else{
|
1315 |
$html .= '<div class="ez-toc-title-container">' . PHP_EOL;
|
1316 |
$html .= '<span class="ez-toc-title-toggle">';
|
1317 |
+
$html .= '<a class="ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle" style="display: none;">' . ezTOC::getTOCToggleIcon() . '</a>';
|
1318 |
$html .= '</span>';
|
1319 |
$html .= '</div>' . PHP_EOL;
|
1320 |
}
|
@@ -257,7 +257,7 @@ if ( ! class_exists( 'ezTOC_Widget' ) ) {
|
|
257 |
<?php
|
258 |
if ( ezTOC_Option::get( 'visibility' ) ) {
|
259 |
|
260 |
-
echo '<a class="ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle"
|
261 |
}
|
262 |
?>
|
263 |
|
257 |
<?php
|
258 |
if ( ezTOC_Option::get( 'visibility' ) ) {
|
259 |
|
260 |
+
echo '<a class="ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle">' . ezTOC::getTOCToggleIcon() . '</a>';
|
261 |
}
|
262 |
?>
|
263 |
|
@@ -25,7 +25,9 @@
|
|
25 |
?>
|
26 |
<a class="eztoc-tablinks" id="eztoc-technical" href="#technical-support"
|
27 |
onclick="ezTocTabToggle(event, 'technical')" data-href="no"><?= esc_html_e( 'Help & Support', 'easy-table-of-contents' ) ?></a>
|
28 |
-
|
|
|
|
|
29 |
<?php
|
30 |
|
31 |
if (function_exists('ez_toc_pro_activation_link')) {
|
@@ -158,7 +160,7 @@
|
|
158 |
</div><!-- /.metabox-holder -->
|
159 |
<?php } ?>
|
160 |
<?php settings_fields('ez-toc-settings'); ?>
|
161 |
-
<?php submit_button(
|
162 |
</form>
|
163 |
</div><!-- /.General Settings ended -->
|
164 |
|
25 |
?>
|
26 |
<a class="eztoc-tablinks" id="eztoc-technical" href="#technical-support"
|
27 |
onclick="ezTocTabToggle(event, 'technical')" data-href="no"><?= esc_html_e( 'Help & Support', 'easy-table-of-contents' ) ?></a>
|
28 |
+
<?php if (!function_exists('ez_toc_pro_activation_link')) { ?>
|
29 |
+
<a class="eztoc-tablinks" id="eztoc-upgrade" href="https://tocwp.com/pricing/" target="_blank"><?= esc_html( 'UPGRADE to PRO', 'easy-table-of-contents' ) ?></a>
|
30 |
+
<?php } ?>
|
31 |
<?php
|
32 |
|
33 |
if (function_exists('ez_toc_pro_activation_link')) {
|
160 |
</div><!-- /.metabox-holder -->
|
161 |
<?php } ?>
|
162 |
<?php settings_fields('ez-toc-settings'); ?>
|
163 |
+
<?php submit_button(esc_html('Save Changes', 'easy-table-of-contents')); ?>
|
164 |
</form>
|
165 |
</div><!-- /.General Settings ended -->
|
166 |
|
@@ -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
|
96 |
}
|
97 |
if (ezTOC_Option::get( 'inline_css' )) {
|
98 |
add_action('wp_head', 'ez_toc_inline_styles');
|
@@ -107,7 +107,7 @@ function ez_toc_woo_category_desc() {
|
|
107 |
$desc = $term_object->description;
|
108 |
preg_match_all( '@<h1.*?>(.*?)<\/h1>@', $desc, $matches );
|
109 |
$array = $matches[1];
|
110 |
-
$container = '<div id="ez-toc-container" class="counter-hierarchy counter-decimal ez-toc-grey"><div class="ez-toc-title-container"><p class="ez-toc-title">' . esc_html_e('Table of Contents', 'easy-table-of-contents') . '</p><span class="ez-toc-title-toggle"><a class="ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle" style="display:
|
111 |
foreach ( $array as $val ) {
|
112 |
$vals .= '<li><a class="anchor" href="#'.$val.'">'.$val.'</a></li>';
|
113 |
$desc = preg_replace('/<h1>(.*?)<\/h1>/', "<h1 id='$1'>$1</h1>", $desc);
|
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-pull-right svg{position:relative;left:-4px;top:3.5px}.ez-toc-pull-right span.dashicons-leftright{transform:rotate(90deg);position:relative;top:3.5px;font-size:10px;right:18.5px}.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}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{color:#444;background:inherit;border:inherit}div#ez-toc-container.afterpara+p,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');
|
107 |
$desc = $term_object->description;
|
108 |
preg_match_all( '@<h1.*?>(.*?)<\/h1>@', $desc, $matches );
|
109 |
$array = $matches[1];
|
110 |
+
$container = '<div id="ez-toc-container" class="counter-hierarchy counter-decimal ez-toc-grey"><div class="ez-toc-title-container"><p class="ez-toc-title">' . esc_html_e('Table of Contents', 'easy-table-of-contents') . '</p><span class="ez-toc-title-toggle"><a class="ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle" style="display: flex;">' . ezTOC::getTOCToggleIcon() . '</a></span></div><nav><ul class="ez-toc-list">';
|
111 |
foreach ( $array as $val ) {
|
112 |
$vals .= '<li><a class="anchor" href="#'.$val.'">'.$val.'</a></li>';
|
113 |
$desc = preg_replace('/<h1>(.*?)<\/h1>/', "<h1 id='$1'>$1</h1>", $desc);
|
@@ -294,6 +294,8 @@ function mb_find_replace( &$find = false, &$replace = false, &$string = '' ) {
|
|
294 |
// ;
|
295 |
//}
|
296 |
|
|
|
|
|
297 |
for ( $i = 0; $i < count( $find ); $i ++ ) {
|
298 |
|
299 |
$needle = $find[ $i ];
|
@@ -320,7 +322,7 @@ function mb_find_replace( &$find = false, &$replace = false, &$string = '' ) {
|
|
320 |
|
321 |
$needle = str_replace(array('’','“','”'), array('\'','"','"'), $needle);
|
322 |
|
323 |
-
$start =
|
324 |
}
|
325 |
|
326 |
/*
|
@@ -354,4 +356,60 @@ function mb_find_replace( &$find = false, &$replace = false, &$string = '' ) {
|
|
354 |
|
355 |
return $string;
|
356 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
endif;
|
294 |
// ;
|
295 |
//}
|
296 |
|
297 |
+
$string = ezTOC_FilterString( $string );
|
298 |
+
|
299 |
for ( $i = 0; $i < count( $find ); $i ++ ) {
|
300 |
|
301 |
$needle = $find[ $i ];
|
322 |
|
323 |
$needle = str_replace(array('’','“','”'), array('\'','"','"'), $needle);
|
324 |
|
325 |
+
$start = mb_stripos( $string, $needle, 0, get_option( 'blog_charset' ) );
|
326 |
}
|
327 |
|
328 |
/*
|
356 |
|
357 |
return $string;
|
358 |
}
|
359 |
+
endif;
|
360 |
+
/**
|
361 |
+
* ezTOC_FilterString Function
|
362 |
+
* for removing unlike character and convert some encoding character from headings.
|
363 |
+
* @access public
|
364 |
+
* @since 2.0.35
|
365 |
+
* @param string|mixed $string
|
366 |
+
*
|
367 |
+
* @return string
|
368 |
+
*/
|
369 |
+
if( ! function_exists('ezTOC_FilterString') ):
|
370 |
+
function ezTOC_FilterString( $string ) {
|
371 |
+
|
372 |
+
$return = html_entity_decode( $string, ENT_QUOTES, get_option( 'blog_charset' ) );
|
373 |
+
|
374 |
+
// $return = br2( $return, ' ' );
|
375 |
+
// $return = trim( strip_tags( $return ) );
|
376 |
+
|
377 |
+
// Convert accented characters to ASCII.
|
378 |
+
// $return = remove_accents( $return );
|
379 |
+
|
380 |
+
// replace newlines with spaces (eg when headings are split over multiple lines)
|
381 |
+
// $return = str_replace( array( "\r", "\n", "\n\r", "\r\n" ), ' ', $return );
|
382 |
+
|
383 |
+
// Remove `&` and ` ` NOTE: in order to strip "hidden" ` `,
|
384 |
+
// title needs to be converted to HTML entities.
|
385 |
+
// @link https://stackoverflow.com/a/21801444/5351316
|
386 |
+
// $return = htmlentities2( $return );
|
387 |
+
$return = str_replace( array( '&', ' '), ' ', $return );
|
388 |
+
$return = str_replace( array( '­' ),'', $return ); // removed silent hypen
|
389 |
+
|
390 |
+
// $return = html_entity_decode( $string, ENT_QUOTES, get_option( 'blog_charset' ) );
|
391 |
+
|
392 |
+
// remove non alphanumeric chars
|
393 |
+
//$return = preg_replace( '/[^a-zA-Z0-9 \-_]*/', '', $return );
|
394 |
+
$return = preg_replace( '/[\x00-\x1F\x7F]*/u', '', $return );
|
395 |
+
|
396 |
+
// Dashes
|
397 |
+
// Special Characters.
|
398 |
+
// - (minus) - (dash) – (en dash) — (em dash)
|
399 |
+
$return = str_replace(
|
400 |
+
array( '-', '-', '–', '—' ),
|
401 |
+
'-',
|
402 |
+
$return
|
403 |
+
);
|
404 |
+
|
405 |
+
// Curley quotes.
|
406 |
+
// ‘ (curly single open quote) ’ (curly single close quote) “ (curly double open quote) ” (curly double close quote)
|
407 |
+
$return = str_replace(
|
408 |
+
array( '‘', '’', '“', '”' ),
|
409 |
+
'',
|
410 |
+
$return
|
411 |
+
);
|
412 |
+
|
413 |
+
return $return;
|
414 |
+
}
|
415 |
endif;
|
Binary file
|
@@ -1,11 +0,0 @@
|
|
1 |
-
<?xml version="1.0" standalone="no"?>
|
2 |
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
-
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
-
<metadata>Generated by IcoMoon</metadata>
|
5 |
-
<defs>
|
6 |
-
<font id="ez-toc-icomoon" horiz-adv-x="1024">
|
7 |
-
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
-
<missing-glyph horiz-adv-x="1024" />
|
9 |
-
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10 |
-
<glyph unicode="" glyph-name="menu" d="M0 576h704v-128h-704v128zM0 768h704v-128h-704v128zM0 384h704v-128h-704v128zM0 192h704v-128h-704v128zM768 384l128-192 128 192h-256zM1024 448l-128 192-128-192h256z" />
|
11 |
-
</font></defs></svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,75 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"IcoMoonType": "selection",
|
3 |
-
"icons": [
|
4 |
-
{
|
5 |
-
"icon": {
|
6 |
-
"paths": [
|
7 |
-
"M0 384h704v128h-704v-128zM0 192h704v128h-704v-128zM0 576h704v128h-704v-128zM0 768h704v128h-704v-128zM768 576l128 192 128-192h-256zM1024 512l-128-192-128 192h256z"
|
8 |
-
],
|
9 |
-
"attrs": [],
|
10 |
-
"isMulticolor": false,
|
11 |
-
"tags": [
|
12 |
-
"menu",
|
13 |
-
"options"
|
14 |
-
],
|
15 |
-
"grid": 16
|
16 |
-
},
|
17 |
-
"attrs": [],
|
18 |
-
"properties": {
|
19 |
-
"order": 6,
|
20 |
-
"id": 184,
|
21 |
-
"prevSize": 32,
|
22 |
-
"code": 59514,
|
23 |
-
"name": "menu",
|
24 |
-
"ligatures": ""
|
25 |
-
},
|
26 |
-
"setIdx": 0,
|
27 |
-
"setId": 4,
|
28 |
-
"iconIdx": 183
|
29 |
-
}
|
30 |
-
],
|
31 |
-
"height": 1024,
|
32 |
-
"metadata": {
|
33 |
-
"name": "ez-toc-icomoon"
|
34 |
-
},
|
35 |
-
"preferences": {
|
36 |
-
"showGlyphs": true,
|
37 |
-
"showQuickUse": true,
|
38 |
-
"showQuickUse2": true,
|
39 |
-
"showSVGs": true,
|
40 |
-
"fontPref": {
|
41 |
-
"prefix": "icon-",
|
42 |
-
"metadata": {
|
43 |
-
"fontFamily": "ez-toc-icomoon",
|
44 |
-
"majorVersion": 1,
|
45 |
-
"minorVersion": 0
|
46 |
-
},
|
47 |
-
"metrics": {
|
48 |
-
"emSize": 1024,
|
49 |
-
"baseline": 6.25,
|
50 |
-
"whitespace": 50
|
51 |
-
},
|
52 |
-
"embed": false,
|
53 |
-
"showVersion": true,
|
54 |
-
"showMetadata": false,
|
55 |
-
"showMetrics": false,
|
56 |
-
"showSelector": true,
|
57 |
-
"selector": "i",
|
58 |
-
"autoHost": true
|
59 |
-
},
|
60 |
-
"imagePref": {
|
61 |
-
"prefix": "icon-",
|
62 |
-
"png": true,
|
63 |
-
"useClassSelector": true,
|
64 |
-
"color": 4473924,
|
65 |
-
"bgColor": 16777215
|
66 |
-
},
|
67 |
-
"historySize": 100,
|
68 |
-
"showCodes": false,
|
69 |
-
"quickUsageToken": {
|
70 |
-
"UntitledProject": "MmZiZGU0YzgwOTdlM2VkNTRjNzYwNDE0OTQ5MTA5MzkjMSMxNDQxMDMwMjM1IyMj"
|
71 |
-
},
|
72 |
-
"fontHostingName": false,
|
73 |
-
"gridSize": 16
|
74 |
-
}
|
75 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,33 +0,0 @@
|
|
1 |
-
@font-face {
|
2 |
-
font-display: swap;
|
3 |
-
font-family: 'ez-toc-icomoon';
|
4 |
-
src:url('fonts/ez-toc-icomoon.eot');
|
5 |
-
src:url('fonts/ez-toc-icomoon.eot?#iefix') format('embedded-opentype'),
|
6 |
-
url('fonts/ez-toc-icomoon.woff2') format('woff2'),
|
7 |
-
url('fonts/ez-toc-icomoon.woff') format('woff'),
|
8 |
-
url('fonts/ez-toc-icomoon.ttf') format('truetype'),
|
9 |
-
url('fonts/ez-toc-icomoon.svg#ez-toc-icomoon') format('svg');
|
10 |
-
font-weight: normal;
|
11 |
-
font-style: normal;
|
12 |
-
}
|
13 |
-
/*
|
14 |
-
* Do not load these styles!!!
|
15 |
-
* @link https://wordpress.org/support/topic/specify-css-rule-for-tag/
|
16 |
-
*/
|
17 |
-
/*i {*/
|
18 |
-
/*font-family: 'ez-toc-icomoon';*/
|
19 |
-
/*speak: none;*/
|
20 |
-
/*font-style: normal;*/
|
21 |
-
/*font-weight: normal;*/
|
22 |
-
/*font-variant: normal;*/
|
23 |
-
/*text-transform: none;*/
|
24 |
-
/*line-height: 1;*/
|
25 |
-
|
26 |
-
/*!* Better Font Rendering =========== *!*/
|
27 |
-
/*-webkit-font-smoothing: antialiased;*/
|
28 |
-
/*-moz-osx-font-smoothing: grayscale;*/
|
29 |
-
/*}*/
|
30 |
-
|
31 |
-
/*.icon-menu:before {*/
|
32 |
-
/*content: "\e87a";*/
|
33 |
-
/*}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1 +0,0 @@
|
|
1 |
-
@font-face{font-display:swap;font-family:ez-toc-icomoon;src:url(fonts/ez-toc-icomoon.eot);src:url(fonts/ez-toc-icomoon.eot?#iefix) format('embedded-opentype'),url(fonts/ez-toc-icomoon.woff2) format('woff2'),url(fonts/ez-toc-icomoon.woff) format('woff'),url(fonts/ez-toc-icomoon.ttf) format('truetype'),url(fonts/ez-toc-icomoon.svg#ez-toc-icomoon) format('svg');font-weight:400;font-style:normal}/*!* Better Font Rendering =========== *!*/
|
|