Version Description
- Fix for loop detection: we had accidentally prevented pages from inserting another page multiple times (not in a loop).
Download this release
Release Info
Developer | figureone |
Plugin | Insert Pages |
Version | 3.5.3.2 |
Comparing to | |
See all releases |
Code changes from version 3.5.3.1 to 3.5.3.2
- insert-pages.php +13 -1
- readme.txt +3 -0
insert-pages.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Text Domain: insert-pages
|
8 |
* Domain Path: /languages
|
9 |
* License: GPL2
|
10 |
-
* Version: 3.5.3.
|
11 |
*
|
12 |
* @package insert-pages
|
13 |
*/
|
@@ -954,6 +954,18 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
954 |
$_GET = $original_get;
|
955 |
$_REQUEST = $original_request;
|
956 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
957 |
return $content;
|
958 |
}
|
959 |
|
7 |
* Text Domain: insert-pages
|
8 |
* Domain Path: /languages
|
9 |
* License: GPL2
|
10 |
+
* Version: 3.5.3.2
|
11 |
*
|
12 |
* @package insert-pages
|
13 |
*/
|
954 |
$_GET = $original_get;
|
955 |
$_REQUEST = $original_request;
|
956 |
|
957 |
+
// Loop detection: remove the page from the stack (so we can still insert
|
958 |
+
// the same page multiple times on another page, but prevent it from being
|
959 |
+
// inserted multiple times within the same recursive chain).
|
960 |
+
if ( isset( $inserted_page->ID ) ) {
|
961 |
+
foreach ( $this->inserted_page_ids as $key => $page_id ) {
|
962 |
+
if ( $page_id === $inserted_page->ID ) {
|
963 |
+
unset( $this->inserted_page_ids[ $key ] );
|
964 |
+
}
|
965 |
+
}
|
966 |
+
}
|
967 |
+
|
968 |
+
|
969 |
return $content;
|
970 |
}
|
971 |
|
readme.txt
CHANGED
@@ -111,6 +111,9 @@ Just one! The plugin prevents you from embedding a page in itself, but you can t
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
|
|
|
|
|
|
114 |
= 3.5.3.1 =
|
115 |
* Revert change affecting Elementor using legacy insert method. Props @progameinc for reporting it so quickly!
|
116 |
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 3.5.3.2 =
|
115 |
+
* Fix for loop detection: we had accidentally prevented pages from inserting another page multiple times (not in a loop).
|
116 |
+
|
117 |
= 3.5.3.1 =
|
118 |
* Revert change affecting Elementor using legacy insert method. Props @progameinc for reporting it so quickly!
|
119 |
|