Version Description
- Temporary removal of front end redirects (resolves issue of duplicate slugs being overriden)
- Bug fix in fatal error with integration with Editorial Access Manager (Thanks to Marco Chiesi)
Download this release
Release Info
Developer | kylephillips |
Plugin | Nested Pages |
Version | 1.6.3 |
Comparing to | |
See all releases |
Code changes from version 1.6.2 to 1.6.3
- app/Entities/PluginIntegration/EditorialAccessManager.php +7 -0
- app/FrontEndBootstrap.php +1 -1
- app/NestedPages.php +1 -1
- app/RedirectsFrontEnd.php +22 -4
- nestedpages.php +1 -1
- readme.txt +5 -1
app/Entities/PluginIntegration/EditorialAccessManager.php
CHANGED
@@ -23,6 +23,13 @@ class EditorialAccessManager
|
|
23 |
|
24 |
public function __construct()
|
25 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
if ( class_exists('Editorial_Access_Manager') ){
|
27 |
$this->installed = true;
|
28 |
$this->user = wp_get_current_user();
|
23 |
|
24 |
public function __construct()
|
25 |
{
|
26 |
+
add_action( 'init', array( $this, 'init' ) );
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Initialize Plugin Integration
|
31 |
+
*/
|
32 |
+
public function init() {
|
33 |
if ( class_exists('Editorial_Access_Manager') ){
|
34 |
$this->installed = true;
|
35 |
$this->user = wp_get_current_user();
|
app/FrontEndBootstrap.php
CHANGED
@@ -10,7 +10,7 @@ class FrontEndBootstrap
|
|
10 |
|
11 |
public function init()
|
12 |
{
|
13 |
-
new RedirectsFrontEnd;
|
14 |
new Entities\NavMenu\NavMenuFrontEnd;
|
15 |
}
|
16 |
}
|
10 |
|
11 |
public function init()
|
12 |
{
|
13 |
+
// new RedirectsFrontEnd;
|
14 |
new Entities\NavMenu\NavMenuFrontEnd;
|
15 |
}
|
16 |
}
|
app/NestedPages.php
CHANGED
@@ -12,7 +12,7 @@ class NestedPages
|
|
12 |
$np_env = 'live';
|
13 |
|
14 |
global $np_version;
|
15 |
-
$np_version = '1.6.
|
16 |
|
17 |
if ( is_admin() ) $app = new NestedPages\Bootstrap;
|
18 |
if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
|
12 |
$np_env = 'live';
|
13 |
|
14 |
global $np_version;
|
15 |
+
$np_version = '1.6.3';
|
16 |
|
17 |
if ( is_admin() ) $app = new NestedPages\Bootstrap;
|
18 |
if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
|
app/RedirectsFrontEnd.php
CHANGED
@@ -8,8 +8,8 @@ class RedirectsFrontEnd
|
|
8 |
{
|
9 |
public function __construct()
|
10 |
{
|
11 |
-
add_filter('page_link', array($this, 'pageLinks'),10,2);
|
12 |
-
add_action('parse_request', array($this, 'parseRequest'));
|
13 |
}
|
14 |
|
15 |
/**
|
@@ -24,15 +24,33 @@ class RedirectsFrontEnd
|
|
24 |
|
25 |
public function parseRequest($wp)
|
26 |
{
|
|
|
27 |
if ( isset($wp->query_vars['error']) ) $slug = basename($wp->request);
|
28 |
if ( isset($wp->query_vars['pagename']) && ! empty($wp->query_vars['pagename']) ) $slug = $wp->query_vars['pagename'];
|
29 |
if ( isset($wp->query_vars['name']) && ! empty($wp->query_vars['name']) ) $slug = $wp->query_vars['name'];
|
30 |
if ( isset($wp->query_vars['attachment']) && ! empty($wp->query_vars['attachment']) ) $slug = $wp->query_vars['attachment'];
|
31 |
-
if ( !isset($slug) ) return;
|
32 |
|
|
|
33 |
$slug = basename($slug);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
$page = get_posts(
|
36 |
if ( !$page ) return;
|
37 |
|
38 |
$parent_type = get_post_type($page[0]->post_parent);
|
8 |
{
|
9 |
public function __construct()
|
10 |
{
|
11 |
+
// add_filter('page_link', array($this, 'pageLinks'),10,2);
|
12 |
+
// add_action('parse_request', array($this, 'parseRequest'));
|
13 |
}
|
14 |
|
15 |
/**
|
24 |
|
25 |
public function parseRequest($wp)
|
26 |
{
|
27 |
+
|
28 |
if ( isset($wp->query_vars['error']) ) $slug = basename($wp->request);
|
29 |
if ( isset($wp->query_vars['pagename']) && ! empty($wp->query_vars['pagename']) ) $slug = $wp->query_vars['pagename'];
|
30 |
if ( isset($wp->query_vars['name']) && ! empty($wp->query_vars['name']) ) $slug = $wp->query_vars['name'];
|
31 |
if ( isset($wp->query_vars['attachment']) && ! empty($wp->query_vars['attachment']) ) $slug = $wp->query_vars['attachment'];
|
32 |
+
if ( !isset($slug) ) return;
|
33 |
|
34 |
+
$segments = explode('/', $slug);
|
35 |
$slug = basename($slug);
|
36 |
+
|
37 |
+
if ( count($segments) > 1 ){
|
38 |
+
$parent_slug = $segments[count($segments) - 2];
|
39 |
+
$parent_post = get_posts(array(
|
40 |
+
'name' => $parent_slug,
|
41 |
+
'post_type' => 'any',
|
42 |
+
'posts_per_page' => 1
|
43 |
+
));
|
44 |
+
}
|
45 |
+
|
46 |
+
$page_args = array(
|
47 |
+
'name' => $slug,
|
48 |
+
'post_type' => 'any',
|
49 |
+
'posts_per_page' => 1
|
50 |
+
);
|
51 |
+
$page_args['post_parent'] = ( isset($parent_post) ) ? $parent_post[0]->ID : 0;
|
52 |
|
53 |
+
$page = get_posts($page_args);
|
54 |
if ( !$page ) return;
|
55 |
|
56 |
$parent_type = get_post_type($page[0]->post_parent);
|
nestedpages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Nested Pages
|
4 |
Plugin URI: http://nestedpages.com
|
5 |
Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
|
6 |
-
Version: 1.6.
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: nestedpages
|
3 |
Plugin Name: Nested Pages
|
4 |
Plugin URI: http://nestedpages.com
|
5 |
Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
|
6 |
+
Version: 1.6.3
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: nestedpages
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://nestedpages.com/
|
|
4 |
Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.6
|
7 |
-
Stable tag: 1.6.
|
8 |
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -99,6 +99,10 @@ As of version 1.6, yes. Visit Settings > Nested Pages > Post Types to configure
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
|
|
102 |
= 1.6.2 =
|
103 |
* Bug fix that was throwing error in the nav menu
|
104 |
|
4 |
Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.6
|
7 |
+
Stable tag: 1.6.2
|
8 |
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 1.6.3 =
|
103 |
+
* Temporary removal of front end redirects (resolves issue of duplicate slugs being overriden)
|
104 |
+
* Bug fix in fatal error with integration with Editorial Access Manager (Thanks to Marco Chiesi)
|
105 |
+
|
106 |
= 1.6.2 =
|
107 |
* Bug fix that was throwing error in the nav menu
|
108 |
|