Version Description
- Fix: when auto insert TOC do not overrided settings "Wrap table of contents with <!--noindex--> tag" and "Skip headings".
- Fix: in some cases, auto insert after first block did not work.
Download this release
Release Info
Developer | theluckywp |
Plugin | LuckyWP Table of Contents |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.5.3
- front/Front.php +4 -1
- luckywp-table-of-contents.php +2 -2
- readme.txt +5 -1
front/Front.php
CHANGED
@@ -123,6 +123,9 @@ class Front extends BaseFront
|
|
123 |
$attrs['linkColor'] = $settings->linkColor;
|
124 |
$attrs['hoverLinkColor'] = $settings->hoverLinkColor;
|
125 |
$attrs['visitedLinkColor'] = $settings->visitedLinkColor;
|
|
|
|
|
|
|
126 |
|
127 |
$shortcode = Core::$plugin->shortcode->make($attrs);
|
128 |
|
@@ -138,7 +141,7 @@ class Front extends BaseFront
|
|
138 |
return $count ? $result : ($shortcode . $content);
|
139 |
|
140 |
case 'afterfirstblock':
|
141 |
-
$result = preg_replace($this->generateRegexp('[^ ]+'), '$1 ' . $shortcode, $content, 1, $count);
|
142 |
return $count ? $result : ($shortcode . $content);
|
143 |
|
144 |
case 'bottom':
|
123 |
$attrs['linkColor'] = $settings->linkColor;
|
124 |
$attrs['hoverLinkColor'] = $settings->hoverLinkColor;
|
125 |
$attrs['visitedLinkColor'] = $settings->visitedLinkColor;
|
126 |
+
$attrs['wrapNoindex'] = $settings->wrapNoindex;
|
127 |
+
$attrs['skipHeadingLevel'] = $settings->skipHeadingLevel;
|
128 |
+
$attrs['skipHeadingText'] = $settings->skipHeadingText;
|
129 |
|
130 |
$shortcode = Core::$plugin->shortcode->make($attrs);
|
131 |
|
141 |
return $count ? $result : ($shortcode . $content);
|
142 |
|
143 |
case 'afterfirstblock':
|
144 |
+
$result = preg_replace($this->generateRegexp('[^ >]+'), '$1 ' . $shortcode, $content, 1, $count);
|
145 |
return $count ? $result : ($shortcode . $content);
|
146 |
|
147 |
case 'bottom':
|
luckywp-table-of-contents.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: LuckyWP Table of Contents
|
4 |
Plugin URI: https://theluckywp.com/product/table-of-contents/
|
5 |
Description: Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).
|
6 |
-
Version: 1.5.
|
7 |
Author: LuckyWP
|
8 |
Author URI: https://theluckywp.com/
|
9 |
Text Domain: lwptoc
|
@@ -29,6 +29,6 @@ $lwptocAutoloader->register();
|
|
29 |
$lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
|
30 |
|
31 |
$config = require(__DIR__ . '/config/plugin.php');
|
32 |
-
(new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.5.
|
33 |
|
34 |
require_once __DIR__ . '/functions.php';
|
3 |
Plugin Name: LuckyWP Table of Contents
|
4 |
Plugin URI: https://theluckywp.com/product/table-of-contents/
|
5 |
Description: Creates a table of contents for your posts/pages. Works automatically or manually (via shortcode, Gutenberg block or widget).
|
6 |
+
Version: 1.5.3
|
7 |
Author: LuckyWP
|
8 |
Author URI: https://theluckywp.com/
|
9 |
Text Domain: lwptoc
|
29 |
$lwptocAutoloader->addNamespace('luckywp\tableOfContents', __DIR__);
|
30 |
|
31 |
$config = require(__DIR__ . '/config/plugin.php');
|
32 |
+
(new \luckywp\tableOfContents\plugin\Plugin($config))->run('1.5.3', __FILE__, 'lwptoc_');
|
33 |
|
34 |
require_once __DIR__ . '/functions.php';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://theluckywp.com/product/table-of-contents/
|
|
4 |
Tags: table of contents, toc, navigation, links, seo
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.2.1
|
7 |
-
Stable tag: 1.5.
|
8 |
Requires PHP: 5.6.20
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -138,6 +138,10 @@ For non-English websites it is recommended to enable the `Intl` PHP extension.
|
|
138 |
|
139 |
== Changelog ==
|
140 |
|
|
|
|
|
|
|
|
|
141 |
= 1.5.2 =
|
142 |
+ Added hook filter `lwptoc_heading_id`.
|
143 |
+ Implemented classic behavior on click "Back" in browser.
|
4 |
Tags: table of contents, toc, navigation, links, seo
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.2.1
|
7 |
+
Stable tag: 1.5.3
|
8 |
Requires PHP: 5.6.20
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
138 |
|
139 |
== Changelog ==
|
140 |
|
141 |
+
= 1.5.3 =
|
142 |
+
* Fix: when auto insert TOC do not overrided settings "Wrap table of contents with <!--noindex--> tag" and "Skip headings".
|
143 |
+
* Fix: in some cases, auto insert after first block did not work.
|
144 |
+
|
145 |
= 1.5.2 =
|
146 |
+ Added hook filter `lwptoc_heading_id`.
|
147 |
+ Implemented classic behavior on click "Back" in browser.
|