WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 8 weeks 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 8 weeks ago.

Download all attachments as: .zip

Change History (2)

@truongwp
8 weeks ago

#1 @truongwp
8 weeks ago

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