[wp-trac] [WordPress Trac] #21094: Remove unnecessary 'menu_name' fallback in get_post_type_labels()
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 28 09:46:02 UTC 2012
#21094: Remove unnecessary 'menu_name' fallback in get_post_type_labels()
--------------------------+----------------------
Reporter: evansolomon | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Post Types | Version:
Severity: normal | Resolution: invalid
Keywords: has-patch |
--------------------------+----------------------
Changes (by duck_):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
The line isn't unnecessary. If `$object->labels['name']` isn't set at that
point then there will be no fallback. For example:
{{{
register_post_type( 'example', array( 'public' => true ) );
}}}
Now there will be a notice during menu generation and the menu item will
have no label.
Maybe it's unlikely to occur, but this fallback code does do something.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21094#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list