Support » WP-Advanced » Admin-menu won't dis-collapse anymore

Admin-menu won't dis-collapse anymore

  • digitaldonkey


    I need a “only-toplevel” Admin menu item. So there is no Page, I just need to trigger a action. It actually works expect, that after collapsing the menu it won’t open, after being collapsed once.

    function clearcachify_menue() {
    <li class="wp-menu-separator"><div class="separator"></div></li>
     <li class="menu-top">
    	<div class="wp-menu-image">
    	  <a href="<?php print $GLOBALS['cache-clear-uri']; ?>">
    	  <img title="Clear cache" src="/wp-admin/images/generic.png">
    	 <a href="<?php print $GLOBALS['cache-clear-uri']; ?>" class="menu-top">Clear Cache</a>
    <?php }
Viewing 2 replies - 1 through 2 (of 2 total)
  • digitaldonkey


    Is this a bug? The collapse-button is behind my button in z-axis and can not be clicked anymore.
    It will work if I hack core: Ensure that collapse-button is the last Item.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]



    In WordPress Version 3.3

    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>';


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Admin-menu won't dis-collapse anymore’ is closed to new replies.