Admin Menu Editor - Version 0.1.6

Version Description

  • Fixed a conflict with All In One SEO Pack 1.6.10. It was caused by that plugin adding invisible sub-menus to a non-existent top-level menu.
Download this release

Release Info

Developer whiteshadow
Plugin Icon 128x128 Admin Menu Editor
Version 0.1.6
Comparing to
See all releases

Code changes from version 0.1.5 to 0.1.6

Files changed (3) hide show
  1. menu-editor-core.php +5 -1
  2. menu-editor.php +1 -1
  3. readme.txt +4 -1
menu-editor-core.php CHANGED
@@ -186,7 +186,7 @@ class WPMenuEditor extends MenuEd_ShadowPluginFramework {
186
 
187
  //Build a tree struct. for the default menu
188
  $default_menu = $this->wp2tree($this->default_wp_menu, $this->default_wp_submenu);
189
-
190
  //Is there a custom menu?
191
  if (!empty($this->options['custom_menu'])){
192
  $custom_menu = $this->options['custom_menu'];
@@ -477,6 +477,10 @@ var customMenu = <?php echo $custom_menu_js; ?>;
477
 
478
  //Attach all submenu items
479
  foreach($submenu as $parent=>$items){
 
 
 
 
480
  foreach($items as $pos=>$item){
481
  //Add this item under the parent
482
  $tree[$parent]['items'][$item[2]] = array(
186
 
187
  //Build a tree struct. for the default menu
188
  $default_menu = $this->wp2tree($this->default_wp_menu, $this->default_wp_submenu);
189
+
190
  //Is there a custom menu?
191
  if (!empty($this->options['custom_menu'])){
192
  $custom_menu = $this->options['custom_menu'];
477
 
478
  //Attach all submenu items
479
  foreach($submenu as $parent=>$items){
480
+ //Skip items that belong to a non-existent parent menu.
481
+ //Rationale : All In One SEO Pack 1.6.10 (and possibly others) doth add such invalid submenus.
482
+ if ( !isset($tree[$parent]) ) continue;
483
+
484
  foreach($items as $pos=>$item){
485
  //Add this item under the parent
486
  $tree[$parent]['items'][$item[2]] = array(
menu-editor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Admin Menu Editor
4
  Plugin URI: http://w-shadow.com/blog/2008/12/20/admin-menu-editor-for-wordpress/
5
  Description: Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more.
6
- Version: 0.1.5
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/blog/
9
  */
3
  Plugin Name: Admin Menu Editor
4
  Plugin URI: http://w-shadow.com/blog/2008/12/20/admin-menu-editor-for-wordpress/
5
  Description: Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more.
6
+ Version: 0.1.6
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/blog/
9
  */
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://w-shadow.com/
4
  Tags: admin, dashboard, menu, security
5
  Requires at least: 2.7.0
6
  Tested up to: 2.9
7
- Stable tag: 0.1.5
8
 
9
  Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more.
10
 
@@ -44,6 +44,9 @@ To upgrade your installation
44
 
45
  == Changelog ==
46
 
 
 
 
47
  = 0.1.5 =
48
  * First release on wordpress.org
49
  * Moved all images into a separate directory.
4
  Tags: admin, dashboard, menu, security
5
  Requires at least: 2.7.0
6
  Tested up to: 2.9
7
+ Stable tag: 0.1.6
8
 
9
  Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more.
10
 
44
 
45
  == Changelog ==
46
 
47
+ = 0.1.6 =
48
+ * Fixed a conflict with All In One SEO Pack 1.6.10. It was caused by that plugin adding invisible sub-menus to a non-existent top-level menu.
49
+
50
  = 0.1.5 =
51
  * First release on wordpress.org
52
  * Moved all images into a separate directory.