Version Description
- Bug fix
Download this release
Release Info
Developer | theluckywp |
Plugin | LuckyWP Table of Contents |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.4.1
- front/Toc.php +1 -1
- luckywp-table-of-contents.php +2 -2
- readme.txt +4 -1
front/Toc.php
CHANGED
@@ -109,7 +109,7 @@ class Toc
|
|
109 |
$fn = function (&$items, $numbers) use (&$fn, $numeration) {
|
110 |
foreach ($items as $key => $item) {
|
111 |
$numbers[count($numbers) - 1]++;
|
112 |
-
$items[$key]['number'] = implode('.', $numeration == 'decimalnested' ? $numbers : array_map([
|
113 |
$fn($items[$key]['childrens'], array_merge($numbers, [0]));
|
114 |
}
|
115 |
};
|
109 |
$fn = function (&$items, $numbers) use (&$fn, $numeration) {
|
110 |
foreach ($items as $key => $item) {
|
111 |
$numbers[count($numbers) - 1]++;
|
112 |
+
$items[$key]['number'] = implode('.', $numeration == 'decimalnested' ? $numbers : array_map([Toc::class, 'decimalToRoman'], $numbers));
|
113 |
$fn($items[$key]['childrens'], array_merge($numbers, [0]));
|
114 |
}
|
115 |
};
|
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 or Gutenberg block).
|
6 |
-
Version: 1.4
|
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.4', __FILE__, 'lwptoc_');
|
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 or Gutenberg block).
|
6 |
+
Version: 1.4.1
|
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.4.1', __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, heading
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.2.1
|
7 |
-
Stable tag: 1.4
|
8 |
Requires PHP: 5.6.20
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -127,6 +127,9 @@ For non-English websites it is recommended to enable the `Intl` PHP extension.
|
|
127 |
|
128 |
== Changelog ==
|
129 |
|
|
|
|
|
|
|
130 |
= 1.4 =
|
131 |
+ Added widget "Table of Contents".
|
132 |
+ Added support output table of contents via `do_shortcode('[lwptoc]')`.
|
4 |
Tags: table of contents, toc, navigation, links, heading
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.2.1
|
7 |
+
Stable tag: 1.4.1
|
8 |
Requires PHP: 5.6.20
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
+
= 1.4.1 =
|
131 |
+
* Bug fix
|
132 |
+
|
133 |
= 1.4 =
|
134 |
+ Added widget "Table of Contents".
|
135 |
+ Added support output table of contents via `do_shortcode('[lwptoc]')`.
|