WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#41980 new defect (bug)

show_in_menu doesn't work with int value

Reported by: truongwp Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9
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)

41980.diff (666 bytes) - added by truongwp 4 years ago.

Download all attachments as: .zip

Change History (2)

@truongwp
4 years ago

#1 @truongwp
4 years ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.