Version Description
- Fixes PHP warning if a search is performed with only one result when WP_DEBUG is enabled.
- Fixes "undefined variable: c" PHP warning on some installs when WP_DEBUG is enabled.
- Tested for WordPress 4.9 compatibility
Download this release
Release Info
Developer | kylephillips |
Plugin | Nested Pages |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
- app/Entities/AdminMenu/AdminSubmenu.php +1 -1
- app/Entities/Listing/Listing.php +1 -0
- app/NestedPages.php +1 -1
- nestedpages.php +1 -1
- readme.txt +14 -9
- vendor/autoload.php +1 -1
- vendor/composer/ClassLoader.php +8 -43
- vendor/composer/autoload_real.php +4 -4
app/Entities/AdminMenu/AdminSubmenu.php
CHANGED
@@ -38,9 +38,9 @@ class AdminSubmenu
|
|
38 |
public function addSubmenu()
|
39 |
{
|
40 |
global $submenu;
|
|
|
41 |
// Get the right submenu and remove all pages link
|
42 |
foreach($submenu as $key => $sub){
|
43 |
-
|
44 |
if ($key == $this->post_type_repo->editSlug($this->post_type)){
|
45 |
// Add the "All Link"
|
46 |
$submenu[$this->slug][50] = array( $sub[5][0], 'publish_pages', esc_url(admin_url('admin.php?page=' . $this->slug)) );
|
38 |
public function addSubmenu()
|
39 |
{
|
40 |
global $submenu;
|
41 |
+
$c = 0;
|
42 |
// Get the right submenu and remove all pages link
|
43 |
foreach($submenu as $key => $sub){
|
|
|
44 |
if ($key == $this->post_type_repo->editSlug($this->post_type)){
|
45 |
// Add the "All Link"
|
46 |
$submenu[$this->slug][50] = array( $sub[5][0], 'publish_pages', esc_url(admin_url('admin.php?page=' . $this->slug)) );
|
app/Entities/Listing/Listing.php
CHANGED
@@ -315,6 +315,7 @@ class Listing
|
|
315 |
$level++;
|
316 |
if ( $parent_status !== 'trash' ) $this->listOpening($pages, $count);
|
317 |
} else {
|
|
|
318 |
$pages = $this->all_posts;
|
319 |
echo '<ol class="sortable no-sort nplist visible">';
|
320 |
}
|
315 |
$level++;
|
316 |
if ( $parent_status !== 'trash' ) $this->listOpening($pages, $count);
|
317 |
} else {
|
318 |
+
$parent_status = null;
|
319 |
$pages = $this->all_posts;
|
320 |
echo '<ol class="sortable no-sort nplist visible">';
|
321 |
}
|
app/NestedPages.php
CHANGED
@@ -12,7 +12,7 @@ class NestedPages
|
|
12 |
$np_env = 'live';
|
13 |
|
14 |
global $np_version;
|
15 |
-
$np_version = '2.0.
|
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 = '2.0.4';
|
16 |
|
17 |
if ( is_admin() ) $app = new NestedPages\Bootstrap;
|
18 |
if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
|
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: 2.0.
|
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: 2.0.4
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: wp-nested-pages
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: kylephillips
|
|
3 |
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.
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -98,6 +98,11 @@ As of version 1.6, yes. Visit Settings > Nested Pages > Post Types to configure
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
|
|
101 |
= 2.0.3 =
|
102 |
* Fixes bug where empty trash was not working under custom post types.
|
103 |
* Fixes issue where sticky status could not be removed from post in quick edit.
|
@@ -121,13 +126,13 @@ As of version 1.6, yes. Visit Settings > Nested Pages > Post Types to configure
|
|
121 |
* Bug fix where saving post type options was enabling all post types
|
122 |
|
123 |
= 1.7.0 =
|
124 |
-
* Added option to disable sorting per post type
|
125 |
-
* Added option to assign a post type page. Assigning a page to a post type adds "Add New" and "All" links to the page row for the given post type, along with a count of published posts for that type
|
126 |
-
* 24 hour time format support added to datepicker time field (follows General Time Format settings)
|
127 |
-
* Custom fields generated by the plugin converted to hidden fields, preventing them from displaying in the post custom field meta box
|
128 |
-
* Bug fix where selecting "Hide in Nested Pages" was not saving in the quick edit interface
|
129 |
-
* rel=page removed from generated nav menu links which was causing errors in W3C validation
|
130 |
-
* Bug fix where menu sync was firing in the background when "Disable menu sync completely" option was selected
|
131 |
|
132 |
= 1.6.8 =
|
133 |
* Bug fix where admin bars were not displaying in Safari until hover
|
3 |
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.9
|
7 |
+
Stable tag: 2.0.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 2.0.4 =
|
102 |
+
* Fixes PHP warning if a search is performed with only one result when WP_DEBUG is enabled.
|
103 |
+
* Fixes "undefined variable: c" PHP warning on some installs when WP_DEBUG is enabled.
|
104 |
+
* Tested for WordPress 4.9 compatibility
|
105 |
+
|
106 |
= 2.0.3 =
|
107 |
* Fixes bug where empty trash was not working under custom post types.
|
108 |
* Fixes issue where sticky status could not be removed from post in quick edit.
|
126 |
* Bug fix where saving post type options was enabling all post types
|
127 |
|
128 |
= 1.7.0 =
|
129 |
+
* Added option to disable sorting per post type.
|
130 |
+
* Added option to assign a post type page. Assigning a page to a post type adds "Add New" and "All" links to the page row for the given post type, along with a count of published posts for that type.
|
131 |
+
* 24 hour time format support added to datepicker time field (follows General Time Format settings).
|
132 |
+
* Custom fields generated by the plugin converted to hidden fields, preventing them from displaying in the post custom field meta box.
|
133 |
+
* Bug fix where selecting "Hide in Nested Pages" was not saving in the quick edit interface.
|
134 |
+
* rel=page removed from generated nav menu links which was causing errors in W3C validation.
|
135 |
+
* Bug fix where menu sync was firing in the background when "Disable menu sync completely" option was selected.
|
136 |
|
137 |
= 1.6.8 =
|
138 |
* Bug fix where admin bars were not displaying in Safari until hover
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -54,15 +54,9 @@ class ClassLoader
|
|
54 |
private $useIncludePath = false;
|
55 |
private $classMap = array();
|
56 |
|
57 |
-
private $classMapAuthoritative = false;
|
58 |
-
|
59 |
public function getPrefixes()
|
60 |
{
|
61 |
-
|
62 |
-
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
63 |
-
}
|
64 |
-
|
65 |
-
return array();
|
66 |
}
|
67 |
|
68 |
public function getPrefixesPsr4()
|
@@ -149,8 +143,6 @@ class ClassLoader
|
|
149 |
* @param string $prefix The prefix/namespace, with trailing '\\'
|
150 |
* @param array|string $paths The PSR-0 base directories
|
151 |
* @param bool $prepend Whether to prepend the directories
|
152 |
-
*
|
153 |
-
* @throws \InvalidArgumentException
|
154 |
*/
|
155 |
public function addPsr4($prefix, $paths, $prepend = false)
|
156 |
{
|
@@ -210,13 +202,10 @@ class ClassLoader
|
|
210 |
* Registers a set of PSR-4 directories for a given namespace,
|
211 |
* replacing any others previously set for this namespace.
|
212 |
*
|
213 |
-
* @param string $prefix
|
214 |
-
* @param array|string $paths
|
215 |
-
*
|
216 |
-
* @throws \InvalidArgumentException
|
217 |
*/
|
218 |
-
public function setPsr4($prefix, $paths)
|
219 |
-
{
|
220 |
if (!$prefix) {
|
221 |
$this->fallbackDirsPsr4 = (array) $paths;
|
222 |
} else {
|
@@ -250,27 +239,6 @@ class ClassLoader
|
|
250 |
return $this->useIncludePath;
|
251 |
}
|
252 |
|
253 |
-
/**
|
254 |
-
* Turns off searching the prefix and fallback directories for classes
|
255 |
-
* that have not been registered with the class map.
|
256 |
-
*
|
257 |
-
* @param bool $classMapAuthoritative
|
258 |
-
*/
|
259 |
-
public function setClassMapAuthoritative($classMapAuthoritative)
|
260 |
-
{
|
261 |
-
$this->classMapAuthoritative = $classMapAuthoritative;
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Should class lookup fail if not found in the current class map?
|
266 |
-
*
|
267 |
-
* @return bool
|
268 |
-
*/
|
269 |
-
public function isClassMapAuthoritative()
|
270 |
-
{
|
271 |
-
return $this->classMapAuthoritative;
|
272 |
-
}
|
273 |
-
|
274 |
/**
|
275 |
* Registers this instance as an autoloader.
|
276 |
*
|
@@ -322,9 +290,6 @@ class ClassLoader
|
|
322 |
if (isset($this->classMap[$class])) {
|
323 |
return $this->classMap[$class];
|
324 |
}
|
325 |
-
if ($this->classMapAuthoritative) {
|
326 |
-
return false;
|
327 |
-
}
|
328 |
|
329 |
$file = $this->findFileWithExtension($class, '.php');
|
330 |
|
@@ -351,7 +316,7 @@ class ClassLoader
|
|
351 |
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
352 |
if (0 === strpos($class, $prefix)) {
|
353 |
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
354 |
-
if (
|
355 |
return $file;
|
356 |
}
|
357 |
}
|
@@ -361,7 +326,7 @@ class ClassLoader
|
|
361 |
|
362 |
// PSR-4 fallback dirs
|
363 |
foreach ($this->fallbackDirsPsr4 as $dir) {
|
364 |
-
if (
|
365 |
return $file;
|
366 |
}
|
367 |
}
|
@@ -380,7 +345,7 @@ class ClassLoader
|
|
380 |
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
381 |
if (0 === strpos($class, $prefix)) {
|
382 |
foreach ($dirs as $dir) {
|
383 |
-
if (
|
384 |
return $file;
|
385 |
}
|
386 |
}
|
@@ -390,7 +355,7 @@ class ClassLoader
|
|
390 |
|
391 |
// PSR-0 fallback dirs
|
392 |
foreach ($this->fallbackDirsPsr0 as $dir) {
|
393 |
-
if (
|
394 |
return $file;
|
395 |
}
|
396 |
}
|
54 |
private $useIncludePath = false;
|
55 |
private $classMap = array();
|
56 |
|
|
|
|
|
57 |
public function getPrefixes()
|
58 |
{
|
59 |
+
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
public function getPrefixesPsr4()
|
143 |
* @param string $prefix The prefix/namespace, with trailing '\\'
|
144 |
* @param array|string $paths The PSR-0 base directories
|
145 |
* @param bool $prepend Whether to prepend the directories
|
|
|
|
|
146 |
*/
|
147 |
public function addPsr4($prefix, $paths, $prepend = false)
|
148 |
{
|
202 |
* Registers a set of PSR-4 directories for a given namespace,
|
203 |
* replacing any others previously set for this namespace.
|
204 |
*
|
205 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
206 |
+
* @param array|string $paths The PSR-4 base directories
|
|
|
|
|
207 |
*/
|
208 |
+
public function setPsr4($prefix, $paths) {
|
|
|
209 |
if (!$prefix) {
|
210 |
$this->fallbackDirsPsr4 = (array) $paths;
|
211 |
} else {
|
239 |
return $this->useIncludePath;
|
240 |
}
|
241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
/**
|
243 |
* Registers this instance as an autoloader.
|
244 |
*
|
290 |
if (isset($this->classMap[$class])) {
|
291 |
return $this->classMap[$class];
|
292 |
}
|
|
|
|
|
|
|
293 |
|
294 |
$file = $this->findFileWithExtension($class, '.php');
|
295 |
|
316 |
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
317 |
if (0 === strpos($class, $prefix)) {
|
318 |
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
319 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
320 |
return $file;
|
321 |
}
|
322 |
}
|
326 |
|
327 |
// PSR-4 fallback dirs
|
328 |
foreach ($this->fallbackDirsPsr4 as $dir) {
|
329 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
330 |
return $file;
|
331 |
}
|
332 |
}
|
345 |
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
346 |
if (0 === strpos($class, $prefix)) {
|
347 |
foreach ($dirs as $dir) {
|
348 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
349 |
return $file;
|
350 |
}
|
351 |
}
|
355 |
|
356 |
// PSR-0 fallback dirs
|
357 |
foreach ($this->fallbackDirsPsr0 as $dir) {
|
358 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
359 |
return $file;
|
360 |
}
|
361 |
}
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit56f1aa73876d57e9dead1f33d820aeb4
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
@@ -44,7 +44,7 @@ class ComposerAutoloaderInit56f1aa73876d57e9dead1f33d820aeb4
|
|
44 |
}
|
45 |
}
|
46 |
|
47 |
-
function
|
48 |
{
|
49 |
require $file;
|
50 |
}
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit236886854fb2275d6b0b4224182e20cd', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
44 |
}
|
45 |
}
|
46 |
|
47 |
+
function composerRequire236886854fb2275d6b0b4224182e20cd($file)
|
48 |
{
|
49 |
require $file;
|
50 |
}
|