CMS Tree Page View - Version 0.8.12

Version Description

  • Fix for forever loading tree
  • No plus-sign on nodes that has no children
Download this release

Release Info

Developer eskapism
Plugin Icon wp plugin CMS Tree Page View
Version 0.8.12
Comparing to
See all releases

Code changes from version 0.8.11 to 0.8.12

Files changed (3) hide show
  1. functions.php +3 -2
  2. index.php +2 -2
  3. readme.txt +6 -2
functions.php CHANGED
@@ -609,6 +609,7 @@ function cms_tpv_print_childs($pageID, $view = "all", $arrOpenChilds = null, $po
609
  $tmpPost = $post;
610
  $post = $onePage;
611
  $page_id = $onePage->ID;
 
612
 
613
  $editLink = get_edit_post_link($onePage->ID, 'notDisplay');
614
  $content = esc_html($onePage->post_content);
@@ -621,7 +622,7 @@ function cms_tpv_print_childs($pageID, $view = "all", $arrOpenChilds = null, $po
621
  $arrChildPages = cms_tpv_get_pages("parent={$onePage->ID}&view=$view&post_type=$post_type");
622
  }
623
 
624
- if ( isset( $arrChildPages ) ) {
625
  $hasChildren = true;
626
  }
627
  // if no children, output no state
@@ -727,7 +728,7 @@ function cms_tpv_print_childs($pageID, $view = "all", $arrOpenChilds = null, $po
727
  "post_type": "<?php echo $onePage->post_type ?>",
728
  "post_status": "<?php echo $onePage->post_status ?>",
729
  "rel": "<?php echo $rel ?>",
730
- "childCount": <?php echo ( isset( $arrChildPages ) ) ? sizeof( $arrChildPages ) : 0 ; ?>,
731
  "permalink": "<?php echo htmlspecialchars_decode(get_permalink($onePage->ID)) ?>",
732
  "editlink": "<?php echo htmlspecialchars_decode($editLink) ?>",
733
  "modified_time": "<?php echo $post_modified_time ?>",
609
  $tmpPost = $post;
610
  $post = $onePage;
611
  $page_id = $onePage->ID;
612
+ $arrChildPages = NULL;
613
 
614
  $editLink = get_edit_post_link($onePage->ID, 'notDisplay');
615
  $content = esc_html($onePage->post_content);
622
  $arrChildPages = cms_tpv_get_pages("parent={$onePage->ID}&view=$view&post_type=$post_type");
623
  }
624
 
625
+ if ( !empty($arrChildPages) ) {
626
  $hasChildren = true;
627
  }
628
  // if no children, output no state
728
  "post_type": "<?php echo $onePage->post_type ?>",
729
  "post_status": "<?php echo $onePage->post_status ?>",
730
  "rel": "<?php echo $rel ?>",
731
+ "childCount": <?php echo ( !empty( $arrChildPages ) ) ? sizeof( $arrChildPages ) : 0 ; ?>,
732
  "permalink": "<?php echo htmlspecialchars_decode(get_permalink($onePage->ID)) ?>",
733
  "editlink": "<?php echo htmlspecialchars_decode($editLink) ?>",
734
  "modified_time": "<?php echo $post_modified_time ?>",
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: CMS Tree Page View
4
  Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/
5
  Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. Use the tree view to edit, view, add pages and search pages (very useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this!
6
- Version: 0.8.11
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
@@ -28,7 +28,7 @@ License: GPL2
28
  #require("functions.php");
29
  require(dirname(__FILE__)."/functions.php");
30
 
31
- define( "CMS_TPV_VERSION", "0.8.11");
32
  define( "CMS_TPV_NAME", "CMS Tree Page View");
33
 
34
  // Find the plugin directory URL
3
  Plugin Name: CMS Tree Page View
4
  Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/
5
  Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. Use the tree view to edit, view, add pages and search pages (very useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this!
6
+ Version: 0.8.12
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
28
  #require("functions.php");
29
  require(dirname(__FILE__)."/functions.php");
30
 
31
+ define( "CMS_TPV_VERSION", "0.8.12");
32
  define( "CMS_TPV_NAME", "CMS Tree Page View");
33
 
34
  // Find the plugin directory URL
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: eskapism, MarsApril
3
  Donate link: http://eskapism.se/sida/donate/
4
  Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin
5
  Requires at least: 3.0
6
- Tested up to: 3.3.1
7
- Stable tag: 0.8.11
8
 
9
  Adds a tree of all your pages or custom posts. Use drag & drop to reorder your pages, and edit, view, add, and search your pages.
10
 
@@ -86,6 +86,10 @@ Now the tree with the pages will be visible both on the dashboard and in the men
86
 
87
  == Changelog ==
88
 
 
 
 
 
89
  = 0.8.11 =
90
  - Changed the way to find the plugin url. Hopefully works better now. Thanks https://twitter.com/windyjonas for the patch.
91
 
3
  Donate link: http://eskapism.se/sida/donate/
4
  Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin
5
  Requires at least: 3.0
6
+ Tested up to: 3.4
7
+ Stable tag: 0.8.12
8
 
9
  Adds a tree of all your pages or custom posts. Use drag & drop to reorder your pages, and edit, view, add, and search your pages.
10
 
86
 
87
  == Changelog ==
88
 
89
+ = 0.8.12 =
90
+ - Fix for forever loading tree
91
+ - No plus-sign on nodes that has no children
92
+
93
  = 0.8.11 =
94
  - Changed the way to find the plugin url. Hopefully works better now. Thanks https://twitter.com/windyjonas for the patch.
95