Version Description
- Allow adding query vars for the inserted page (for example, to insert a specific tab of the WooCommerce My Account page:
[insert page=my-account display=content querystring=pagename=my-account&downloads]
). - Tested up to WordPress 5.6.1.
Download this release
Release Info
Developer | figureone |
Plugin | Insert Pages |
Version | 3.5.8 |
Comparing to | |
See all releases |
Code changes from version 3.5.7 to 3.5.8
- insert-pages.php +6 -1
- readme.txt +5 -1
insert-pages.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Text Domain: insert-pages
|
8 |
* Domain Path: /languages
|
9 |
* License: GPL2
|
10 |
-
* Version: 3.5.
|
11 |
*
|
12 |
* @package insert-pages
|
13 |
*/
|
@@ -435,6 +435,10 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
435 |
$_GET[ $param ] = $value;
|
436 |
$_REQUEST[ $param ] = $value;
|
437 |
}
|
|
|
|
|
|
|
|
|
438 |
|
439 |
// Use "Normal" insert method (get_post).
|
440 |
if ( 'legacy' !== $options['wpip_insert_method'] ) {
|
@@ -991,6 +995,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
991 |
// Unset any querystring params included in the shortcode.
|
992 |
$_GET = $original_get;
|
993 |
$_REQUEST = $original_request;
|
|
|
994 |
|
995 |
// Loop detection: remove the page from the stack (so we can still insert
|
996 |
// the same page multiple times on another page, but prevent it from being
|
7 |
* Text Domain: insert-pages
|
8 |
* Domain Path: /languages
|
9 |
* License: GPL2
|
10 |
+
* Version: 3.5.8
|
11 |
*
|
12 |
* @package insert-pages
|
13 |
*/
|
435 |
$_GET[ $param ] = $value;
|
436 |
$_REQUEST[ $param ] = $value;
|
437 |
}
|
438 |
+
$original_wp_query_vars = $GLOBALS['wp']->query_vars;
|
439 |
+
if ( ! empty( $querystring ) && isset( $GLOBALS['wp'] ) && method_exists( $GLOBALS['wp'], 'parse_request' ) ) {
|
440 |
+
$GLOBALS['wp']->parse_request( $querystring );
|
441 |
+
}
|
442 |
|
443 |
// Use "Normal" insert method (get_post).
|
444 |
if ( 'legacy' !== $options['wpip_insert_method'] ) {
|
995 |
// Unset any querystring params included in the shortcode.
|
996 |
$_GET = $original_get;
|
997 |
$_REQUEST = $original_request;
|
998 |
+
$GLOBALS['wp']->query_vars = $original_wp_query_vars;
|
999 |
|
1000 |
// Loop detection: remove the page from the stack (so we can still insert
|
1001 |
// the same page multiple times on another page, but prevent it from being
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: figureone, the_magician
|
3 |
Tags: insert, pages, shortcode, embed
|
4 |
Requires at least: 3.0.1
|
5 |
-
Tested up to: 5.
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -111,6 +111,10 @@ Just one! The plugin prevents you from embedding a page in itself, but you can t
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
|
|
|
|
|
|
|
|
114 |
= 3.5.7 =
|
115 |
* Prevent Flamingo (Contact Forms 7 plugin) inbound messages with the same slug as an existing inserted page from showing up.
|
116 |
|
2 |
Contributors: figureone, the_magician
|
3 |
Tags: insert, pages, shortcode, embed
|
4 |
Requires at least: 3.0.1
|
5 |
+
Tested up to: 5.6.1
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 3.5.8 =
|
115 |
+
* Allow adding query vars for the inserted page (for example, to insert a specific tab of the WooCommerce My Account page: `[insert page=‘my-account’ display=‘content’ querystring=‘pagename=my-account&downloads’]`).
|
116 |
+
* Tested up to WordPress 5.6.1.
|
117 |
+
|
118 |
= 3.5.7 =
|
119 |
* Prevent Flamingo (Contact Forms 7 plugin) inbound messages with the same slug as an existing inserted page from showing up.
|
120 |
|