WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15094 closed defect (bug) (fixed)

Redundant function_exists() check in wp_nav_menu()

Reported by: scribu Owned by:
Milestone: 3.1 Priority: normal
Severity: minor Version:
Component: Menus Keywords:
Focuses: Cc:

Description

When the 'fallback_cb' arg is checked, it calls function_exists() right before is_callable(), which not only is redundant, but also prevents passing a class method as a callback.

Attachments (1)

15094.diff (787 bytes) - added by scribu 4 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 @scribu4 years ago

  • Severity changed from normal to minor

Ok, it doesn't prevent passing a class method, since it's ORed, but it's still redundant.

@scribu4 years ago

comment:2 @scribu4 years ago

Related: [15772]

comment:3 @scribu4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15774]) Remove redundant call to function_exists() in wp_nav_menu(). Fixes #15094

comment:4 @hakre4 years ago

Related: [15772]

Note: See TracTickets for help on using tickets.