Admin Menu Editor - Version 1.1.13

Version Description

  • Fixed a layout glitch that would cause the editor sidebar to display incorrectly in WP 3.5.
  • When trying to determine the current menu, the plugin will now ignore all links that contain nothing but an "#anchor". Various plugins use such links as separators and it wouldn't make sense to highlight them.
  • Tested on WP 3.5 (RC6).
Download this release

Release Info

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

Code changes from version 1.1.12 to 1.1.13

css/menu-editor.css CHANGED
@@ -31,25 +31,23 @@
31
  */
32
 
33
  #ws_editor_sidebar {
34
- width: 138px;
35
  padding: 2px;
36
  }
37
 
38
- .ws_main_button {
39
  clear: both;
40
  display: block;
41
  margin: 4px;
42
- margin-left: auto;
43
- margin-right: auto;
44
  width: 120px;
45
- padding: 4px !important;
46
  }
47
 
48
- #ws_save_menu {
49
  margin-bottom: 20px;
50
  }
51
 
52
- #ws_export_menu {
53
  margin-top: 12px;
54
  }
55
 
31
  */
32
 
33
  #ws_editor_sidebar {
34
+ width: auto;
35
  padding: 2px;
36
  }
37
 
38
+ #ws_editor_sidebar .ws_main_button {
39
  clear: both;
40
  display: block;
41
  margin: 4px;
 
 
42
  width: 120px;
43
+ padding: 4px;
44
  }
45
 
46
+ #ws_editor_sidebar #ws_save_menu {
47
  margin-bottom: 20px;
48
  }
49
 
50
+ #ws_editor_sidebar #ws_export_menu {
51
  margin-top: 12px;
52
  }
53
 
includes/menu-editor-core.php CHANGED
@@ -193,7 +193,7 @@ class WPMenuEditor extends MenuEd_ShadowPluginFramework {
193
  * @return void
194
  */
195
  function enqueue_styles(){
196
- wp_enqueue_style('menu-editor-style', plugins_url('css/menu-editor.css', $this->plugin_file), array(), '20120915');
197
  }
198
 
199
  /**
193
  * @return void
194
  */
195
  function enqueue_styles(){
196
+ wp_enqueue_style('menu-editor-style', plugins_url('css/menu-editor.css', $this->plugin_file), array(), '20121210');
197
  }
198
 
199
  /**
js/menu-highlight-fix.js CHANGED
@@ -55,20 +55,29 @@ jQuery(function($) {
55
  adminMenu.find('li > a').each(function(index, link) {
56
  var $link = $(link);
57
 
58
- //Skip "#" links. Some plugins (e.g. S2Member 120703) use such no-op items as menu dividers.
59
- if ($link.attr('href') == '#') {
 
60
  return;
61
  }
62
 
63
  var uri = parseUri(link.href);
64
 
 
 
 
 
 
 
 
 
 
65
  //Check for a close match - everything but query and #anchor.
66
  var components = ['protocol', 'host', 'port', 'user', 'password', 'path'];
67
  var isCloseMatch = true;
68
  for (var i = 0; (i < components.length) && isCloseMatch; i++) {
69
  isCloseMatch = isCloseMatch && (uri[components[i]] == currentUri[components[i]]);
70
  }
71
- //TODO: Consider using get_current_screen and the current_screen filter to get post types and taxonomies.
72
 
73
  if (!isCloseMatch) {
74
  return; //Skip to the next link.
55
  adminMenu.find('li > a').each(function(index, link) {
56
  var $link = $(link);
57
 
58
+ //Skip links that contain nothing but an "#anchor". Both AME and some
59
+ //other plugins (e.g. S2Member 120703) use them as separators.
60
+ if ($link.attr('href').substring(0, 1) == '#') {
61
  return;
62
  }
63
 
64
  var uri = parseUri(link.href);
65
 
66
+ //Special case: if post_type is not specified for edit.php and post-new.php,
67
+ //WordPress assumes it is "post". Here we make this explicit.
68
+ if ( (uri.file === 'edit.php') || (uri.file === 'post-new.php') ) {
69
+ if ( !uri.queryKey.hasOwnProperty('post_type') ) {
70
+ uri.queryKey['post_type'] = 'post';
71
+ }
72
+ }
73
+ //TODO: Consider using get_current_screen and the current_screen filter to get post types and taxonomies.
74
+
75
  //Check for a close match - everything but query and #anchor.
76
  var components = ['protocol', 'host', 'port', 'user', 'password', 'path'];
77
  var isCloseMatch = true;
78
  for (var i = 0; (i < components.length) && isCloseMatch; i++) {
79
  isCloseMatch = isCloseMatch && (uri[components[i]] == currentUri[components[i]]);
80
  }
 
81
 
82
  if (!isCloseMatch) {
83
  return; //Skip to the next link.
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: 1.1.12
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/
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: 1.1.13
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/
9
  */
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: whiteshadow
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A6P9S6CE3SRSW
4
  Tags: admin, dashboard, menu, security, wpmu
5
  Requires at least: 3.2
6
- Tested up to: 3.4.2
7
- Stable tag: 1.1.12
8
 
9
  Lets you edit the WordPress admin menu. You can re-order, hide or rename menus, add custom menus and more.
10
 
@@ -19,7 +19,7 @@ Admin Menu Editor lets you manually edit the Dashboard menu. You can reorder the
19
  * Move a menu item to a different submenu.
20
  * Create custom menus that point to any part of the Dashboard or an external URL.
21
 
22
- The [Pro version](http://w-shadow.com/AdminMenuEditor/) lets you set per-role [menu permissions](http://w-shadow.com/admin-menu-editor-pro/documentation/permissions/), hide a menu from everyone except a specific user, export your admin menu, drag items between menu levels, make menus open in a new window and more.
23
 
24
  **Notes**
25
 
@@ -63,6 +63,11 @@ Plugins installed in the `mu-plugins` directory are treated as "always on", so y
63
 
64
  == Changelog ==
65
 
 
 
 
 
 
66
  = 1.1.12 =
67
  * Fixed several more small CPT-related bugs that would cause the wrong menu to be marked as current.
68
  * Tested on WP 3.5-beta2.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A6P9S6CE3SRSW
4
  Tags: admin, dashboard, menu, security, wpmu
5
  Requires at least: 3.2
6
+ Tested up to: 3.5
7
+ Stable tag: 1.1.13
8
 
9
  Lets you edit the WordPress admin menu. You can re-order, hide or rename menus, add custom menus and more.
10
 
19
  * Move a menu item to a different submenu.
20
  * Create custom menus that point to any part of the Dashboard or an external URL.
21
 
22
+ The [Pro version](http://w-shadow.com/AdminMenuEditor/) lets you set per-role menu permissions, hide a menu from everyone except a specific user, export your admin menu, drag items between menu levels, make menus open in a new window and more. [Try live demo](http://amedemo.com/wpdemo/demo.php).
23
 
24
  **Notes**
25
 
63
 
64
  == Changelog ==
65
 
66
+ = 1.1.13 =
67
+ * Fixed a layout glitch that would cause the editor sidebar to display incorrectly in WP 3.5.
68
+ * When trying to determine the current menu, the plugin will now ignore all links that contain nothing but an "#anchor". Various plugins use such links as separators and it wouldn't make sense to highlight them.
69
+ * Tested on WP 3.5 (RC6).
70
+
71
  = 1.1.12 =
72
  * Fixed several more small CPT-related bugs that would cause the wrong menu to be marked as current.
73
  * Tested on WP 3.5-beta2.