WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#52175 closed defect (bug) (fixed)

Docs: Wrong parameter type used for Rest User controller

Reported by: iviweb Owned by: SergeyBiryukov
Milestone: 5.7 Priority: normal
Severity: normal Version: 5.6
Component: REST API Keywords: has-patch
Focuses: docs, rest-api Cc:

Description

In class-wp-rest-users-controller.php line 1076 prepare_links method documented wrongly.
@param WP_User should be instead of WP_Post

Attachments (2)

Screenshot_3.png (45.0 KB) - added by iviweb 9 months ago.
Code fragment screenshot
52175.diff (612 bytes) - added by mukesh27 9 months ago.

Download all attachments as: .zip

Change History (5)

@iviweb
9 months ago

Code fragment screenshot

@mukesh27
9 months ago

#1 @mukesh27
9 months ago

  • Keywords has-patch added
  • Summary changed from PHPDoc parameter type issue on Rest User controller to Docs: Wrong parameter type used for Rest User controller

Hi there and welcome to WordPress Core Trac,

Thank you for spotting this! 52175.diff fixed the doc issue.

#2 @SergeyBiryukov
9 months ago

  • Focuses coding-standards removed
  • Milestone changed from Awaiting Review to 5.7

#3 @SergeyBiryukov
9 months ago

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

In 49906:

Docs: Correct the type of the $user parameter in WP_REST_Users_Controller::prepare_links().

Props iviweb, mukesh27.
Fixes #52175.

Note: See TracTickets for help on using tickets.