Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#12992 closed defect (bug) (fixed)

Custom Post Type with Custom Icon Retains Post Icon Ghost

Reported by: wmrom's profile wmrom Owned by: nacin's profile nacin
Milestone: 3.0 Priority: low
Severity: normal Version:
Component: Posts, Post Types Keywords: post types, icons, admin menu
Focuses: Cc:

Description

When I attach an icon to a custom post type in the latest 3.0beta1 version, the ghost of a 'post' icon was still visible. On hover, the 'ghost image' is covered by my icon, though I can see parts of it sticking out from the edges.

The problem is from the fact that the <li> item still had the 'menu-icon-posts' class, calling the posts background image, but slapping the new icon on top. It uses opacity to get the same effect that the other menu items get, hence the ghost image underneath it. I've fixed the problem and included the diff from wp-admin/menu.php, as well as screenshots.

Attachments (3)

menu.diff (1.7 KB) - added by wmrom 14 years ago.
Diff file showing changes
icon-hover-off.jpg (50.5 KB) - added by wmrom 14 years ago.
A screenshot of the icon when not hovering
icon-hover-on.jpg (31.5 KB) - added by wmrom 14 years ago.
A screenshot of the icon when hovering

Download all attachments as: .zip

Change History (6)

@wmrom
14 years ago

Diff file showing changes

@wmrom
14 years ago

A screenshot of the icon when not hovering

@wmrom
14 years ago

A screenshot of the icon when hovering

#1 @matthewhollett
14 years ago

I've noticed this too, would be great if it was fixed.

#2 @nacin
14 years ago

  • Owner set to nacin
  • Status changed from new to accepted

Going to simplify it a little further and rename all of the classes to .menu-icon-(post|page) instead of posts/pages. Thus, we can simply use the post type name (sanitized). We've already renamed them from IDs this cycle, so nothing broken beyond what we've already broken.

I wonder if we should we add the IDs back in, in case a plugin is currently selecting them.

#3 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [14100]) Fix menu icons for custom post types. Fixes #12992, props wmrom.

Note: See TracTickets for help on using tickets.