WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#27745 closed defect (bug) (fixed)

Incorrect return value PHPdoc for wp_create_nav_menu()

Reported by: danielbachhuber Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Menus Keywords: good-first-bug has-patch 4.0-early commit
Focuses: docs Cc:

Description

wp_create_nav_menu() claims it returns a menu object, but it really returns a menu ID

I think this has been in there for 4 years (r15104), so safe to just update the PHPdoc instead of changing the response value.

Attachments (1)

27745.diff (548 bytes) - added by Tmeister 7 years ago.
Change the return value in the phpdoc block

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
7 years ago

  • Keywords good-first-bug added

@Tmeister
7 years ago

Change the return value in the phpdoc block

#2 @Tmeister
7 years ago

  • Keywords has-patch added; needs-patch removed

Patch added

#3 @SergeyBiryukov
7 years ago

  • Keywords 4.0-early added

#4 @DrewAPicture
7 years ago

  • Keywords commit added

Hi Tmeister, thanks for the patch. This will be ready for commit once we move to the 4.0 milestone.

#5 @samuelsidler
7 years ago

  • Milestone changed from Future Release to 4.0

#6 @SergeyBiryukov
7 years ago

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

In 28242:

Correct @return value for wp_create_nav_menu() and wp_delete_nav_menu().

props Tmeister.
fixes #27745.

Note: See TracTickets for help on using tickets.