Admin Menu Tree Page View - Version 1.1

Version Description

  • Children count was sometines wrong.
Download this release

Release Info

Developer eskapism
Plugin Icon wp plugin Admin Menu Tree Page View
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

Files changed (3) hide show
  1. index.php +7 -3
  2. readme.txt +4 -0
  3. screenshot-3.png +0 -0
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Admin Menu Tree Page View
4
  Plugin URI: http://eskapism.se/code-playground/admin-menu-tree-page-view/
5
  Description: Get a tree view of all your pages directly in the admin menu. Search, edit, view and add pages - all with just one click away!
6
- Version: 1.0
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
@@ -32,7 +32,7 @@ add_action('wp_ajax_admin_menu_tree_page_view_add_page', 'admin_menu_tree_page_v
32
 
33
  function admin_menu_tree_page_view_admin_init() {
34
 
35
- define( "admin_menu_tree_page_view_VERSION", "1.0" );
36
  define( "admin_menu_tree_page_view_URL", WP_PLUGIN_URL . '/admin-menu-tree-page-view/' );
37
 
38
  wp_enqueue_style("admin_menu_tree_page_view_styles", admin_menu_tree_page_view_URL . "styles.css", false, admin_menu_tree_page_view_VERSION);
@@ -76,8 +76,12 @@ function admin_menu_tree_page_view_get_pages($args) {
76
  $title = get_the_title($one_page->ID);
77
 
78
  // add num of children to the title
79
- $post_children = get_children($one_page->ID);
 
 
 
80
  $post_children_count = sizeof($post_children);
 
81
  if ($post_children_count>0) {
82
  $title .= " <span class='child-count'>($post_children_count)</span>";
83
  }
3
  Plugin Name: Admin Menu Tree Page View
4
  Plugin URI: http://eskapism.se/code-playground/admin-menu-tree-page-view/
5
  Description: Get a tree view of all your pages directly in the admin menu. Search, edit, view and add pages - all with just one click away!
6
+ Version: 1.1
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
32
 
33
  function admin_menu_tree_page_view_admin_init() {
34
 
35
+ define( "admin_menu_tree_page_view_VERSION", "1.1" );
36
  define( "admin_menu_tree_page_view_URL", WP_PLUGIN_URL . '/admin-menu-tree-page-view/' );
37
 
38
  wp_enqueue_style("admin_menu_tree_page_view_styles", admin_menu_tree_page_view_URL . "styles.css", false, admin_menu_tree_page_view_VERSION);
76
  $title = get_the_title($one_page->ID);
77
 
78
  // add num of children to the title
79
+ $post_children = get_children(array(
80
+ "post_parent" => $one_page->ID,
81
+ "post_type" => "page"
82
+ ));
83
  $post_children_count = sizeof($post_children);
84
+ // var_dump($post_children_count);
85
  if ($post_children_count>0) {
86
  $title .= " <span class='child-count'>($post_children_count)</span>";
87
  }
readme.txt CHANGED
@@ -36,9 +36,13 @@ Now the tree with the pages will be visible in the admin menu to the left.
36
 
37
  1. The menu page tree with all your pages. Pretty neat, eh? You add new pages too. And search your pages. In conclusion: with this plugin you will be a page kung fu master.
38
  2. Search your pages in real time. Try it; it's wonderful! ;)
 
39
 
40
  == Changelog ==
41
 
 
 
 
42
  = 1.0 =
43
  - Added functionality to expand/collapse
44
 
36
 
37
  1. The menu page tree with all your pages. Pretty neat, eh? You add new pages too. And search your pages. In conclusion: with this plugin you will be a page kung fu master.
38
  2. Search your pages in real time. Try it; it's wonderful! ;)
39
+ 3. You can expand/collapse sub-pages. Keeps the meny compact, but gives you the option to instantly dig deep down the page hierarchy.
40
 
41
  == Changelog ==
42
 
43
+ = 1.1 =
44
+ - Children count was sometines wrong.
45
+
46
  = 1.0 =
47
  - Added functionality to expand/collapse
48
 
screenshot-3.png ADDED
Binary file