Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#24186 closed defect (bug) (invalid)

Custom Menu Icon not showing for Custom Post Type

Reported by: adam-meyer's profile Adam Meyer Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

Version: 3.6-beta1-24067

This is the first possible bug I've ever reported, so hope I have done it right.

I have specified a custom menu icon as follows during register_post_type:

'menu_icon' => get_bloginfo('template_url').'/images/pillar-icon-16.png',

I have confirmed the image file is in its correct location, but it's still showing the default post icon in the dashboard menu.

The above code works when running 3.5.1.

Change History (7)

#1 @SergeyBiryukov
12 years ago

  • Keywords reporter-feedback added; needs-testing 2nd-opinion removed

Could not reproduce in current trunk (3.6-beta1-24095), the icon shows up for me.

As long as a string is passed in that parameter, it will be used as the icon URL:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/menu.php#L110

It doesn't even matter if the URL is valid. If it's invalid, a broken icon will be displayed instead of the default one.

Could you make sure the post type you are adding the icon to is the one where you expect to see it?

#2 @Adam Meyer
12 years ago

Thanks Sergey for your reply, I realised I had stuck it in the $labels array accidentally.

Sorry for the inconvenience - I will count that as my rookie mistake.

Adam

#3 @Adam Meyer
12 years ago

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

#4 @Adam Meyer
12 years ago

  • Keywords reporter-feedback removed

#5 @johnbillion
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#6 @johnbillion
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

#7 @SergeyBiryukov
12 years ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.