Version Description
- Additional security enhancements (Thanks Nico Mollet)
- Developer improvements through added filters and filter usage corrections (Thanks Bjrnar Tollaksen & Alexandre Sadowski)
- Adds post title filter for customizing title display beyond the_title filter
Download this release
Release Info
Developer | kylephillips |
Plugin | Nested Pages |
Version | 3.1.14 |
Comparing to | |
See all releases |
Code changes from version 3.1.13 to 3.1.14
- app/Entities/AdminMenu/AdminSubmenu.php +1 -1
- app/Entities/Listing/Listing.php +2 -2
- app/Entities/Post/PostFactory.php +4 -0
- app/NestedPages.php +1 -1
- app/Views/partials/row-link.php +1 -1
- app/Views/partials/row.php +5 -2
- composer.json +1 -1
- nestedpages.php +1 -1
- readme.txt +7 -2
app/Entities/AdminMenu/AdminSubmenu.php
CHANGED
@@ -71,7 +71,7 @@ class AdminSubmenu
|
|
71 |
{
|
72 |
foreach ( $submenu as $key => $items ){
|
73 |
foreach ( $items as $item ){
|
74 |
-
if ( $item == 'edit.php?post_type=' . $this->post_type->name ) return $key;
|
75 |
}
|
76 |
}
|
77 |
return false;
|
71 |
{
|
72 |
foreach ( $submenu as $key => $items ){
|
73 |
foreach ( $items as $item ){
|
74 |
+
if ( $item == 'edit.php' || $item == 'edit.php?post_type=' . $this->post_type->name ) return $key;
|
75 |
}
|
76 |
}
|
77 |
return false;
|
app/Entities/Listing/Listing.php
CHANGED
@@ -419,7 +419,7 @@ class Listing
|
|
419 |
|
420 |
// CSS Classes for the <li> row element
|
421 |
$template = ( $this->post->template )
|
422 |
-
? ' tpl-' . str_replace('.php', '', $this->post->template)
|
423 |
: '';
|
424 |
|
425 |
$row_classes = '';
|
@@ -452,4 +452,4 @@ class Listing
|
|
452 |
|
453 |
if ( $parent_status !== 'trash' ) echo '</ol><!-- list close -->';
|
454 |
}
|
455 |
-
}
|
419 |
|
420 |
// CSS Classes for the <li> row element
|
421 |
$template = ( $this->post->template )
|
422 |
+
? ' tpl-' . str_replace('.php', '', sanitize_html_class( $this->post->template ) )
|
423 |
: '';
|
424 |
|
425 |
$row_classes = '';
|
452 |
|
453 |
if ( $parent_status !== 'trash' ) echo '</ol><!-- list close -->';
|
454 |
}
|
455 |
+
}
|
app/Entities/Post/PostFactory.php
CHANGED
@@ -66,6 +66,10 @@ class PostFactory
|
|
66 |
if ( isset($data['page_template']) ) $this->post_update_repo->updateTemplate($data);
|
67 |
if ( isset($data['nav_status']) ) $this->post_update_repo->updateNavStatus($data);
|
68 |
$this->new_ids[$key] = $new_page_id;
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
return $this->getNewPosts($post_type);
|
71 |
}
|
66 |
if ( isset($data['page_template']) ) $this->post_update_repo->updateTemplate($data);
|
67 |
if ( isset($data['nav_status']) ) $this->post_update_repo->updateNavStatus($data);
|
68 |
$this->new_ids[$key] = $new_page_id;
|
69 |
+
|
70 |
+
$new_post = get_post($new_page_id);
|
71 |
+
$new_post->post_content = (string) apply_filters('default_content', $new_post->post_content, $new_post);
|
72 |
+
wp_update_post($new_post);
|
73 |
}
|
74 |
return $this->getNewPosts($post_type);
|
75 |
}
|
app/NestedPages.php
CHANGED
@@ -12,7 +12,7 @@ class NestedPages
|
|
12 |
$np_env = 'live';
|
13 |
|
14 |
global $np_version;
|
15 |
-
$np_version = '3.1.
|
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 = '3.1.14';
|
16 |
|
17 |
if ( is_admin() ) $app = new NestedPages\Bootstrap;
|
18 |
if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
|
app/Views/partials/row-link.php
CHANGED
@@ -31,7 +31,7 @@ endif;
|
|
31 |
|
32 |
<a href="<?php echo $link; ?>" class="page-link page-title" <?php if ( $new_window ) echo 'target="_blank"'; ?>>
|
33 |
<span class="title">
|
34 |
-
<?php echo apply_filters('the_title', $this->post->title, $this->post->id
|
35 |
<svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>
|
36 |
</span>
|
37 |
<?php
|
31 |
|
32 |
<a href="<?php echo $link; ?>" class="page-link page-title" <?php if ( $new_window ) echo 'target="_blank"'; ?>>
|
33 |
<span class="title">
|
34 |
+
<?php echo apply_filters('the_title', $this->post->title, $this->post->id); ?>
|
35 |
<svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>
|
36 |
</span>
|
37 |
<?php
|
app/Views/partials/row.php
CHANGED
@@ -28,7 +28,8 @@ if ( !$wpml ) $wpml_pages = true;
|
|
28 |
<a href="<?php echo apply_filters('nestedpages_edit_link', get_edit_post_link(), $this->post); ?>" class="page-link page-title">
|
29 |
<span class="title">
|
30 |
<?php
|
31 |
-
|
|
|
32 |
echo $this->postStates($assigned_pt);
|
33 |
?>
|
34 |
</span>
|
@@ -264,7 +265,9 @@ if ( !$wpml ) $wpml_pages = true;
|
|
264 |
if ( in_array('view', $this->post_type_settings->row_actions) ) :
|
265 |
if ( $this->post->status == 'publish' ) :
|
266 |
$link = apply_filters('nestedpages_view_link', get_the_permalink(), $this->post);
|
267 |
-
$link = ( $this->post_type->name
|
|
|
|
|
268 |
?>
|
269 |
<a href="<?php echo $link; ?>" class="np-btn np-view-button" target="_blank">
|
270 |
<?php echo apply_filters('nestedpages_view_link_text', __('View', 'wp-nested-pages'), $this->post); ?>
|
28 |
<a href="<?php echo apply_filters('nestedpages_edit_link', get_edit_post_link(), $this->post); ?>" class="page-link page-title">
|
29 |
<span class="title">
|
30 |
<?php
|
31 |
+
$title = apply_filters( 'the_title', $this->post->title, $this->post->id );
|
32 |
+
echo apply_filters('nestedpages_post_title', $title, $this->post);
|
33 |
echo $this->postStates($assigned_pt);
|
34 |
?>
|
35 |
</span>
|
265 |
if ( in_array('view', $this->post_type_settings->row_actions) ) :
|
266 |
if ( $this->post->status == 'publish' ) :
|
267 |
$link = apply_filters('nestedpages_view_link', get_the_permalink(), $this->post);
|
268 |
+
$link = ( $this->post_type->name !== 'post' )
|
269 |
+
? apply_filters('page_link', $link, $this->post->ID, false)
|
270 |
+
: apply_filters('post_link', $link, $this->post, false);
|
271 |
?>
|
272 |
<a href="<?php echo $link; ?>" class="np-btn np-view-button" target="_blank">
|
273 |
<?php echo apply_filters('nestedpages_view_link_text', __('View', 'wp-nested-pages'), $this->post); ?>
|
composer.json
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
],
|
13 |
"type": "wordpress-plugin",
|
14 |
"require": {
|
15 |
-
"php": ">=5.
|
16 |
"composer/installers": "v1.0.6"
|
17 |
},
|
18 |
"autoload": {
|
12 |
],
|
13 |
"type": "wordpress-plugin",
|
14 |
"require": {
|
15 |
+
"php": ">=5.4.0",
|
16 |
"composer/installers": "v1.0.6"
|
17 |
},
|
18 |
"autoload": {
|
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: 3.1.
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: wp-nested-pages
|
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: 3.1.14
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: wp-nested-pages
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: kylephillips
|
|
3 |
Donate link: https://github.com/sponsors/kylephillips/
|
4 |
Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 5.
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 3.1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -105,6 +105,11 @@ No. The menu synchronization currently only works within the pages post type.
|
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
|
|
|
|
108 |
= 3.1.13 =
|
109 |
* Corrects permission issues introduced in previous update
|
110 |
|
3 |
Donate link: https://github.com/sponsors/kylephillips/
|
4 |
Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 5.7
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 3.1.13
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
105 |
|
106 |
== Changelog ==
|
107 |
|
108 |
+
= 3.1.14 =
|
109 |
+
* Additional security enhancements (Thanks Nico Mollet)
|
110 |
+
* Developer improvements through added filters and filter usage corrections (Thanks Bjørnar Tollaksen & Alexandre Sadowski)
|
111 |
+
* Adds post title filter for customizing title display beyond the_title filter
|
112 |
+
|
113 |
= 3.1.13 =
|
114 |
* Corrects permission issues introduced in previous update
|
115 |
|