[wp-trac] [WordPress Trac] #20595: Collapsible Admin menu fails if items are added by code

WordPress Trac wp-trac at lists.automattic.com
Tue May 1 23:27:42 UTC 2012


#20595: Collapsible Admin menu fails if items are added by code
----------------------------+-----------------------------
 Reporter:  digitaldonkey   |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.3.1
 Severity:  normal          |   Keywords:  dev-feedback
----------------------------+-----------------------------
 If I add a Button to the admin meny by '''action adminmenu''' the menu
 wont rebuid from collapsed state due z-index issues. In my opinion
 creating the menue might be changed to the following:


 {{{

 diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php
 index cdd81b2..8454a3d 100644
 --- a/wp-admin/menu-header.php
 +++ b/wp-admin/menu-header.php
 @@ -164,10 +164,6 @@ function _wp_menu_output( $menu, $submenu,
 $submenu_as_parent = true ) {
                 }
                 echo "</li>";
         }
 -
 -       echo '<li id="collapse-menu" class="hide-if-no-js"><div id
 ="collapse-button"><div></div></div>';
 -       echo '<span>' . esc_html__( 'Collapse menu' ) . '</span>';
 -       echo '</li>';
  }

  ?>
 @@ -181,6 +177,9 @@ function _wp_menu_output( $menu, $submenu,
 $submenu_as_parent = true ) {

  _wp_menu_output( $menu, $submenu );
  do_action( 'adminmenu' );
 +echo '<li id="collapse-menu" class="hide-if-no-js"><div id="collapse-
 button"><div></div></div>';
 +echo '<span>' . esc_html__( 'Collapse menu' ) . '</span>';
 +echo '</li>';

  ?>
  </ul>
 }}}

 see also: http://wordpress.org/support/topic/admin-menu-wont-dis-collapse-
 anymore

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20595>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list