WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#36736 closed defect (bug) (fixed)

get_link_to_edit function displaying wrong param documentation

Reported by: tloureiro Owned by: DrewAPicture
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.6
Component: General Keywords: has-patch
Focuses: docs Cc:

Description

The bookmark.php's function get_link_to_edit currently displays

  • @param int $link_id ID of link to retrieve.

but when we look at get_bookmark function, it accepts both id AND stdClass

So we changed both function documentation and variable name (from $link_id to $bookmark ) to reflect parameter possibilities.

Attachments (1)

get_link_to_edit.diff (650 bytes) - added by tloureiro 4 years ago.

Download all attachments as: .zip

Change History (4)

#1 @DrewAPicture
4 years ago

  • Focuses docs added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.6
  • Type changed from enhancement to defect (bug)

Hi @tloureiro, thanks for the patch, and good catch!

#2 @DrewAPicture
4 years ago

In 37351:

Links: Clarify documentation for the $link_id parameter to mention that it accepts either an integer or object.

Props tloureiro.
See #36736.

#3 @DrewAPicture
4 years ago

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

In 37353:

Links: Rename the $link_id parameter in get_link_to_edit() to $link to better reflect that it can accept a link ID or object.

Props tloureiro for the initial patch.
Fixes #36736.

Note: See TracTickets for help on using tickets.