WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 weeks ago

#38844 new enhancement

Post Type Objects and Menu Icons

Reported by: michael.ecklund Owned by:
Milestone: 5.4 Priority: normal
Severity: normal Version: 3.0
Component: Posts, Post Types Keywords: has-patch good-first-bug
Focuses: ui, administration Cc:
PR Number:

Description

When using get_post_type_object(); the core Post Types don't have a menu_icon available.

For example:

$page_object = get_post_type_object( 'page' );

echo $page_object->menu_icon;

When executing the above code, I would expect that to output the same icon used in the administration menu on the left. This goes for all core Post Types.

Attachments (3)

38844.patch (845 bytes) - added by SergeyBiryukov 3 years ago.
38844.diff (1.0 KB) - added by m.usama.masood 3 weeks ago.
38844.2.patch (1.0 KB) - added by m.usama.masood 3 weeks ago.

Download all attachments as: .zip

Change History (8)

#1 @SergeyBiryukov
3 years ago

  • Keywords has-patch added

#2 @desrosj
7 months ago

  • Keywords needs-refresh good-first-bug added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 4.6.1 to 3.0

The menu_icon parameter was introduced in [14014].

Patch needs a refresh.

This ticket was mentioned in Slack in #core by m.usama.masood. View the logs.


3 weeks ago

@m.usama.masood
3 weeks ago

#4 @m.usama.masood
3 weeks ago

The menu_icon parameter has been added in parameters for default post types.

#5 @davidbaumwald
2 weeks ago

  • Keywords needs-refresh removed
  • Milestone changed from Future Release to 5.4
Note: See TracTickets for help on using tickets.