Viewing 15 replies - 1 through 15 (of 21 total)
  • davidquay231

    (@davidquay231)

    Ditto to this … seems to be 3.9 specific

    Kelli Standish

    (@shamarkaleo)

    Same here. Would love to find a way to fix this.

    Kelli Standish

    (@shamarkaleo)

    A couple notes in case this helps anyone else:

    I tried the fix listed here for 3.8, but it didn’t work for me.

    So as a temporary fix, just to get rid of the hideous broken image icons in my client’s menu bar, I went here: /wp-admin/options-general.php?page=ozh_admin_menu

    And unchecked the “Display original icons” box. Now there are no icons, but at least that hides the broken image icons 🙂

    Thread Starter TheViv

    (@octotoot)

    What’s weird is that some icons have come back while others haven’t.

    The icons restored are plugin ones such as Quick Cache, Shareaholic, WordPress SEO (Yoast), Meteor Slides. The WordPress ones have not.

    3.9 now uses a font called Dashicons. There are no image files to access anymore, so this will require a rewrite to the plugin code.

    Hi there, a temporary solution I found is:

    – disable sublevel icons in Settings/Admin menu

    – in plugin’s file inc/core.php, wrap lines from 82 to 89 within an IF that disables icons:

    if ($wp_ozh_adminmenu['wpicons']) {
    	$imgstyle = ($wp_ozh_adminmenu['wpicons']) ? '' : 'style="display:none"';
    	$img = '';
    	if ( isset($item[6]) && ! empty($item[6]) ) {
    		if ( 'none' === $item[6] || 'div' === $item[6] )
    			$img = '<div '.$imgstyle.' class="wp-menu-image"><br /></div>';
    		else
    			$img = '<img '.$imgstyle.' class="wp-menu-image" src="' . $item[6] . '" alt="" />';
    	}
    }

    hope this help

    Jackie

    (@wordpressmacuser)

    Even if your disable icon portion of the plugin, the server throws all these 404 errors. My server seems to think its worthy of a level 10 security mention

    hello all

    this is a temporary solution that will display the new Dashicons set instead of empty icons

    – open the plugin directory and edit the file in that path inc/core.php , starting from line 85 you will find this part of code

    if ( isset($item[6]) && ! empty($item[6]) ) {
    			if ( 'none' === $item[6] || 'div' === $item[6] )
    				$img = '<div '.$imgstyle.' class="wp-menu-image"><br /></div>';
    			else
    				$img = '<img '.$imgstyle.' class="wp-menu-image" src="' . $item[6] . '" alt="" />';
    		}

    just replace it with the following code

    if ( isset($item[6]) && ! empty($item[6]) ) {
    			preg_match('/^dashicons/', $item[6], $matches);
    			if ( 'none' === $item[6] || 'div' === $item[6] )
    				$img = '<div '.$imgstyle.' class="wp-menu-image"><br /></div>';
    			elseif (!empty($matches))
    				$img = '<div '.$imgstyle.' class="wp-menu-image dashicons-before '.$item[6].'"><br /></div>';
    			else
    				$img = '<img '.$imgstyle.' class="wp-menu-image" src="' . $item[6] . '" alt="" />';
    		}

    i tried to keep the orginal code of the plugin away of modifications , i just added a new condition that look for “dashicons” and then it will alter the div classes with the needed icon class

    hope this help

    Thread Starter TheViv

    (@octotoot)

    @muhammad Mahmoud – outstanding!!

    the file name is ozh-admin-drop-down-menu/inc/core.php – was a bit confused at first which one.

    thank you!

    Tried the above code and, while the dashicons font shows up, there are two of them; one white that is overlaid by another that is grey and offset down and to the left.

    Changing the class from dashicons-before to dashicons-after clears the overlay.

    @spherical
    that’s weird ! , i got the class name from the native wordpress styling for menu items
    if you have a normal dashboard without Ozh plugin and inspected the menu items code you will find that wordpress uses class “dashicons-before” !

    @ Br. Muhammad – Your code worked perfectly fine for my installation of wordpress. Jzk!

    Plugin Author Ozh

    (@ozh)

    Peeps, the plugin is hosted on Github, anyone fancy a pull request? 🙂
    https://github.com/ozh/ozh-admin-drop-down-menu

    Thanks for the fix guys. Works nearly perfectly now.:)

    @muhammad Mahmoud: Thank you for the fix, now it looks good again. 🙂 The only thing is that they’re sticking on the bottom:

    View post on imgur.com

    Have you an idea how to center them vertically, too?

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Menu Icons Missing – WP 3.9’ is closed to new replies.