Version Description
- Modified code for compatibility with Toolset Access plugin.
Download this release
Release Info
Developer | theluckywp |
Plugin | LuckyWP Table of Contents |
Version | 1.5.5 |
Comparing to | |
See all releases |
Code changes from version 1.5.4 to 1.5.5
- luckywp-table-of-contents.php +2 -2
- plugin/Plugin.php +22 -8
- readme.txt +4 -1
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.5
|
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.5', __FILE__, 'lwptoc_');
|
33 |
|
34 |
require_once __DIR__ . '/functions.php';
|
plugin/Plugin.php
CHANGED
@@ -51,14 +51,8 @@ class Plugin extends BasePlugin
|
|
51 |
*/
|
52 |
public function init()
|
53 |
{
|
54 |
-
add_filter('the_content',
|
55 |
-
|
56 |
-
return $content;
|
57 |
-
}, 1);
|
58 |
-
add_filter('the_content', function ($content) {
|
59 |
-
$this->isTheContent = false;
|
60 |
-
return $content;
|
61 |
-
}, 10000);
|
62 |
add_action('widgets_init', function () {
|
63 |
register_widget(WpWidget::class);
|
64 |
});
|
@@ -71,6 +65,26 @@ class Plugin extends BasePlugin
|
|
71 |
});
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
private $_postTypes;
|
75 |
|
76 |
/**
|
51 |
*/
|
52 |
public function init()
|
53 |
{
|
54 |
+
add_filter('the_content', [$this, 'onTheContentTrue'], 1);
|
55 |
+
add_filter('the_content', [$this, 'onTheContentFalse'], 10000);
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
add_action('widgets_init', function () {
|
57 |
register_widget(WpWidget::class);
|
58 |
});
|
65 |
});
|
66 |
}
|
67 |
|
68 |
+
/**
|
69 |
+
* @param string $content
|
70 |
+
* @return string
|
71 |
+
*/
|
72 |
+
public function onTheContentTrue($content)
|
73 |
+
{
|
74 |
+
$this->isTheContent = true;
|
75 |
+
return $content;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* @param string $content
|
80 |
+
* @return string
|
81 |
+
*/
|
82 |
+
public function onTheContentFalse($content)
|
83 |
+
{
|
84 |
+
$this->isTheContent = false;
|
85 |
+
return $content;
|
86 |
+
}
|
87 |
+
|
88 |
private $_postTypes;
|
89 |
|
90 |
/**
|
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.2
|
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,9 @@ For non-English websites it is recommended to enable the `Intl` PHP extension.
|
|
138 |
|
139 |
== Changelog ==
|
140 |
|
|
|
|
|
|
|
141 |
= 1.5.4 =
|
142 |
* Added support Beaver Builder plugin.
|
143 |
* Fix: in some cases, headings processing did not work correctly.
|
4 |
Tags: table of contents, toc, navigation, links, seo
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.2.2
|
7 |
+
Stable tag: 1.5.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 |
|
139 |
== Changelog ==
|
140 |
|
141 |
+
= 1.5.5 =
|
142 |
+
* Modified code for compatibility with Toolset Access plugin.
|
143 |
+
|
144 |
= 1.5.4 =
|
145 |
* Added support Beaver Builder plugin.
|
146 |
* Fix: in some cases, headings processing did not work correctly.
|