#41980 closed enhancement (invalid)
show_in_menu doesn't work with int value
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
The show_in_menu
parameter in register_post_type()
function doesn't work with int value (or some other value which be treated as true if convert to boolean). I tried to use 1
instead of true
, some other parameters work except show_in_menu
. The problem is WordPress use Not Identical
operator instead of Not Equal
to check the value of show_in_menu
when render admin menu items.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
According to the docs,
show_in_menu
only acceptsbool
orstring
.int
values are not accepted and I can't see a reason of why they should be accepted.If you can provide an use case on where switch to
int
could be valuable, maybe this could be reconsidered, but just asking to change for the sake of changing it its not a great idea.I'm closing this as
invalid
. Feel free to reopen it, if you happen to have a use case to better showcase the need of this improvement