Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#52175 closed defect (bug) (fixed)

Docs: Wrong parameter type used for Rest User controller

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


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 4 years ago.
Code fragment screenshot
52175.diff (612 bytes) - added by mukesh27 4 years ago.

Download all attachments as: .zip

Change History (5)

4 years ago

Code fragment screenshot

4 years ago

#1 @mukesh27
4 years 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
4 years ago

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

#3 @SergeyBiryukov
4 years 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.