Easy Table of Contents - Version 1.2

Version Description

04/29/2016 = * TWEAK: Remove the font family from styling the TOC title header. * TWEAK: Pass the raw title to the ez_toc_title filter. * BUG: A jQuery 1.12 fix for WordPress 4.5.

Download this release

Release Info

Developer shazahm1@hotmail.com
Plugin Icon 128x128 Easy Table of Contents
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

README.txt CHANGED
@@ -2,9 +2,10 @@
2
  Contributors: shazahm1@hotmail.com
3
  Donate link: http://connections-pro.com/
4
  Tags: table of contents, toc
5
- Requires at least: 3.2
6
- Tested up to: 4.4
7
- Stable tag: 1.1
 
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -89,6 +90,11 @@ Easy Table Contents is a fork of the excellent [Table of Contents Plus](https://
89
 
90
  == Changelog ==
91
 
 
 
 
 
 
92
  = 1.1 02/24/2016 =
93
  * FEATURE: Add option to replace header wither alternate header text in the table of content.
94
  * NEW: Introduce the ez_toc_filter.
2
  Contributors: shazahm1@hotmail.com
3
  Donate link: http://connections-pro.com/
4
  Tags: table of contents, toc
5
+ Requires at least: 4.3
6
+ Tested up to: 4.9
7
+ Requires PHP: 5.3
8
+ Stable tag: 1.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
90
 
91
  == Changelog ==
92
 
93
+ = 1.2 04/29/2016 =
94
+ * TWEAK: Remove the font family from styling the TOC title header.
95
+ * TWEAK: Pass the raw title to the `ez_toc_title` filter.
96
+ * BUG: A jQuery 1.12 fix for WordPress 4.5.
97
+
98
  = 1.1 02/24/2016 =
99
  * FEATURE: Add option to replace header wither alternate header text in the table of content.
100
  * NEW: Introduce the ez_toc_filter.
assets/css/screen.css CHANGED
@@ -69,7 +69,7 @@
69
 
70
  #ez-toc-container p.ez-toc-title {
71
  text-align: left;
72
- font-family: "Arial Narrow", sans-serif;
73
  font-size: 18px;
74
  font-weight: 500;
75
  line-height: 1.45;
69
 
70
  #ez-toc-container p.ez-toc-title {
71
  text-align: left;
72
+ /*font-family: "Arial Narrow", sans-serif;*/
73
  font-size: 18px;
74
  font-weight: 500;
75
  line-height: 1.45;
assets/css/screen.min.css CHANGED
@@ -2,11 +2,11 @@
2
  .ez-toc-widget-container{position:relative;white-space:nowrap}#ez-toc-container.ez-toc-light-blue{background:#edf6ff}#ez-toc-container.ez-toc-white{background:#fff}
3
  #ez-toc-container.ez-toc-black{background:#000}#ez-toc-container.ez-toc-transparent{background:none transparent}.ez-toc-widget-container ul.ez-toc-list{padding:0 10px}
4
  #ez-toc-container ul ul,.ez-toc div.ez-toc-widget-container ul ul{margin-left:1.5em}#ez-toc-container ul,#ez-toc-container li{margin:0;padding:0}#ez-toc-container ul,#ez-toc-container li,#ez-toc-container ul li,.ez-toc-widget-container,.ez-toc-widget-container li{background:0;list-style-type:none;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}
5
- #ez-toc-container p.ez-toc-title{text-align:left;font-family:"Arial Narrow",sans-serif;font-size:18px;font-weight:500;line-height:1.45;margin:0;padding:0}
6
- .ez-toc-title-container{display:table;width:100%}.ez-toc-title,.ez-toc-title-toggle{display:table-cell;text-align:left;vertical-align:middle}#ez-toc-container.ez-toc-black p.ez-toc-title{color:#FFF}
7
- #ez-toc-container p.ez-toc-title+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}
8
- #ez-toc-container a{color:#444;text-decoration:none;text-shadow:none}#ez-toc-container a:visited{color:#9f9f9f}#ez-toc-container a:hover{text-decoration:underline}
9
- #ez-toc-container.ez-toc-black a{color:#FFF}#ez-toc-container.ez-toc-black a:visited{color:#FFF}#ez-toc-container a.ez-toc-toggle{color:#444}#ez-toc-container.counter-hierarchy ul,.ez-toc-widget-container.counter-hierarchy ul,#ez-toc-container.counter-flat ul,.ez-toc-widget-container.counter-flat ul{counter-reset:item}
10
  #ez-toc-container.counter-numeric li,.ez-toc-widget-container.counter-numeric li{list-style-type:decimal;list-style-position:inside}#ez-toc-container.counter-decimal ul.ez-toc-list li a::before,.ez-toc-widget-container.counter-decimal ul.ez-toc-list li a::before{content:counters(item,".") ". ";counter-increment:item}
11
  #ez-toc-container.counter-roman li a::before,.ez-toc-widget-container.counter-roman ul.ez-toc-list li a::before{content:counters(item,".",upper-roman) ". ";counter-increment:item}
12
  .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}
2
  .ez-toc-widget-container{position:relative;white-space:nowrap}#ez-toc-container.ez-toc-light-blue{background:#edf6ff}#ez-toc-container.ez-toc-white{background:#fff}
3
  #ez-toc-container.ez-toc-black{background:#000}#ez-toc-container.ez-toc-transparent{background:none transparent}.ez-toc-widget-container ul.ez-toc-list{padding:0 10px}
4
  #ez-toc-container ul ul,.ez-toc div.ez-toc-widget-container ul ul{margin-left:1.5em}#ez-toc-container ul,#ez-toc-container li{margin:0;padding:0}#ez-toc-container ul,#ez-toc-container li,#ez-toc-container ul li,.ez-toc-widget-container,.ez-toc-widget-container li{background:0;list-style-type:none;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}
5
+ #ez-toc-container p.ez-toc-title{text-align:left;font-size:18px;font-weight:500;line-height:1.45;margin:0;padding:0}.ez-toc-title-container{display:table;width:100%}
6
+ .ez-toc-title,.ez-toc-title-toggle{display:table-cell;text-align:left;vertical-align:middle}#ez-toc-container.ez-toc-black p.ez-toc-title{color:#FFF}#ez-toc-container p.ez-toc-title+ul.ez-toc-list{margin-top:1em}
7
+ .ez-toc-wrap-left{float:left;margin-right:10px}.ez-toc-wrap-right{float:right;margin-left:10px}#ez-toc-container a{color:#444;text-decoration:none;text-shadow:none}
8
+ #ez-toc-container a:visited{color:#9f9f9f}#ez-toc-container a:hover{text-decoration:underline}#ez-toc-container.ez-toc-black a{color:#FFF}#ez-toc-container.ez-toc-black a:visited{color:#FFF}
9
+ #ez-toc-container a.ez-toc-toggle{color:#444}#ez-toc-container.counter-hierarchy ul,.ez-toc-widget-container.counter-hierarchy ul,#ez-toc-container.counter-flat ul,.ez-toc-widget-container.counter-flat ul{counter-reset:item}
10
  #ez-toc-container.counter-numeric li,.ez-toc-widget-container.counter-numeric li{list-style-type:decimal;list-style-position:inside}#ez-toc-container.counter-decimal ul.ez-toc-list li a::before,.ez-toc-widget-container.counter-decimal ul.ez-toc-list li a::before{content:counters(item,".") ". ";counter-increment:item}
11
  #ez-toc-container.counter-roman li a::before,.ez-toc-widget-container.counter-roman ul.ez-toc-list li a::before{content:counters(item,".",upper-roman) ". ";counter-increment:item}
12
  .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}
assets/js/front.js CHANGED
@@ -159,7 +159,7 @@ jQuery( document ).ready( function( $ ) {
159
 
160
  // Get link by section or article id
161
  function getRelatedNavigation( element ) {
162
- return $( '.ez-toc-widget-container .ez-toc-list a[href=#' + $( element ).attr( 'id' ) + ']' );
163
  }
164
 
165
  function getScrollOffset( element ) {
159
 
160
  // Get link by section or article id
161
  function getRelatedNavigation( element ) {
162
+ return $( '.ez-toc-widget-container .ez-toc-list a[href="#' + $( element ).attr( 'id' ) + '"]' );
163
  }
164
 
165
  function getScrollOffset( element ) {
assets/js/front.min.js CHANGED
@@ -8,7 +8,7 @@ var g=ezTOC.visibility_hide_by_default;if(Cookies){Cookies.get("ezTOC_hidetoc")=
8
  }if(g){a.data("visible",false);}if(!a.data("visible")){e("ul.ez-toc-list").hide();}a.click(function(i){i.preventDefault();if(e(this).data("visible")){e(this).data("visible",false);
9
  if(Cookies){if(g){Cookies.set("ezTOC_hidetoc",null,{path:"/"});}else{Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"});}}e("ul.ez-toc-list").hide("fast");
10
  }else{e(this).data("visible",true);if(Cookies){if(g){Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"});}else{Cookies.set("ezTOC_hidetoc",null,{path:"/"});
11
- }}e("ul.ez-toc-list").show("fast");}});}function h(i){return e(".ez-toc-widget-container .ez-toc-list a[href=#"+e(i).attr("id")+"]");}function d(j){var i=(typeof ezTOC.scroll_offset!="undefined")?parseInt(ezTOC.scroll_offset):30;
12
  var l=e(j).height()+i;var k=e("#wpadminbar");if(0===k.length){l=l-30;}return parseInt(l);}e("span.ez-toc-section").waypoint(function(j){var i=h(this.element).toggleClass("active",j==="down");
13
  i.toggleClass("active",j==="down").parent().toggleClass("active",j==="down");},{offset:"90%"});e("span.ez-toc-section").waypoint(function(j){var i=h(this.element).toggleClass("active",j==="up");
14
  i.toggleClass("active",j==="up").parent().toggleClass("active",j==="up");},{offset:d(this.element)});var c=e(".ez-toc-widget-container ul.ez-toc-list li").css("line-height");
8
  }if(g){a.data("visible",false);}if(!a.data("visible")){e("ul.ez-toc-list").hide();}a.click(function(i){i.preventDefault();if(e(this).data("visible")){e(this).data("visible",false);
9
  if(Cookies){if(g){Cookies.set("ezTOC_hidetoc",null,{path:"/"});}else{Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"});}}e("ul.ez-toc-list").hide("fast");
10
  }else{e(this).data("visible",true);if(Cookies){if(g){Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"});}else{Cookies.set("ezTOC_hidetoc",null,{path:"/"});
11
+ }}e("ul.ez-toc-list").show("fast");}});}function h(i){return e('.ez-toc-widget-container .ez-toc-list a[href="#'+e(i).attr("id")+'"]');}function d(j){var i=(typeof ezTOC.scroll_offset!="undefined")?parseInt(ezTOC.scroll_offset):30;
12
  var l=e(j).height()+i;var k=e("#wpadminbar");if(0===k.length){l=l-30;}return parseInt(l);}e("span.ez-toc-section").waypoint(function(j){var i=h(this.element).toggleClass("active",j==="down");
13
  i.toggleClass("active",j==="down").parent().toggleClass("active",j==="down");},{offset:"90%"});e("span.ez-toc-section").waypoint(function(j){var i=h(this.element).toggleClass("active",j==="up");
14
  i.toggleClass("active",j==="up").parent().toggleClass("active",j==="up");},{offset:d(this.element)});var c=e(".ez-toc-widget-container ul.ez-toc-list li").css("line-height");
easy-table-of-contents.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: Easy Table of Contents
4
  * Plugin URI: http://connections-pro.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: 1.1
7
  * Author: Steven A. Zahm
8
  * Author URI: http://connections-pro.com/
9
  * Text Domain: ez_toc
10
  * Domain Path: languages
11
  *
12
- * Copyright 2015 Steven A. Zahm ( email : helpdesk@connections-pro.com )
13
  *
14
  * Easy Table of Contents is free software; you can redistribute it and/or modify
15
  * it under the terms of the GNU General Public License, version 2, as
@@ -26,7 +26,7 @@
26
  * @package Easy Table of Contents
27
  * @category Plugin
28
  * @author Steven A. Zahm
29
- * @version 1.1
30
  */
31
 
32
  // Exit if accessed directly
@@ -45,7 +45,7 @@ if ( ! class_exists( 'ezTOC' ) ) {
45
  * @since 1.0
46
  * @var string
47
  */
48
- const VERSION = '1.1';
49
 
50
  /**
51
  * Stores the instance of this class.
@@ -439,7 +439,8 @@ if ( ! class_exists( 'ezTOC' ) ) {
439
  // list item
440
  if ( in_array( $matches[ $i ][2], ezTOC_Option::get( 'heading_levels' ) ) ) {
441
 
442
- $title = apply_filters( 'ez_toc_title', strip_tags( wp_kses_post( $matches[ $i ][0] ) ) );
 
443
 
444
  //$html .= '<a href="#' . self::url_anchor_target( $title ) . '">';
445
  $html .= sprintf(
@@ -770,7 +771,8 @@ if ( ! class_exists( 'ezTOC' ) ) {
770
  if ( ! ezTOC_Option::get( 'show_hierarchy' ) ) {
771
 
772
  $items .= '<li><a href="' . esc_url( '#' . $anchor ) . '">';
773
- $title = apply_filters( 'ez_toc_title', strip_tags( wp_kses_post( $toc[ $i ][0] ) ) );
 
774
 
775
  //if ( 'decimal' == ezTOC_Option::get( 'counter' ) ) {
776
  //
3
  * Plugin Name: Easy Table of Contents
4
  * Plugin URI: http://connections-pro.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: 1.2
7
  * Author: Steven A. Zahm
8
  * Author URI: http://connections-pro.com/
9
  * Text Domain: ez_toc
10
  * Domain Path: languages
11
  *
12
+ * Copyright 2016 Steven A. Zahm ( email : helpdesk@connections-pro.com )
13
  *
14
  * Easy Table of Contents is free software; you can redistribute it and/or modify
15
  * it under the terms of the GNU General Public License, version 2, as
26
  * @package Easy Table of Contents
27
  * @category Plugin
28
  * @author Steven A. Zahm
29
+ * @version 1.2
30
  */
31
 
32
  // Exit if accessed directly
45
  * @since 1.0
46
  * @var string
47
  */
48
+ const VERSION = '1.2';
49
 
50
  /**
51
  * Stores the instance of this class.
439
  // list item
440
  if ( in_array( $matches[ $i ][2], ezTOC_Option::get( 'heading_levels' ) ) ) {
441
 
442
+ //$title = apply_filters( 'ez_toc_title', strip_tags( wp_kses_post( $matches[ $i ][0] ) ) );
443
+ $title = strip_tags( apply_filters( 'ez_toc_title', $matches[ $i ][0] ) );
444
 
445
  //$html .= '<a href="#' . self::url_anchor_target( $title ) . '">';
446
  $html .= sprintf(
771
  if ( ! ezTOC_Option::get( 'show_hierarchy' ) ) {
772
 
773
  $items .= '<li><a href="' . esc_url( '#' . $anchor ) . '">';
774
+ //$title = apply_filters( 'ez_toc_title', strip_tags( wp_kses_post( $toc[ $i ][0] ) ) );
775
+ $title = strip_tags( apply_filters( 'ez_toc_title', $toc[ $i ][0] ) );
776
 
777
  //if ( 'decimal' == ezTOC_Option::get( 'counter' ) ) {
778
  //