WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

#53088 closed enhancement (fixed)

Docs: Add @global current_user to the get_user_by docblock

Reported by: mukesh27 Owned by: mukesh27
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Users Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description (last modified by SergeyBiryukov)

In the recent fix of ticket #28020 with changeset [50790] it used global $current_user; but the document of that global variable missing.

We should add the below doc for global variable like.

* @global WP_User $current_user The current user object which holds the user data.

Added keyword good-first-bug so any new contributor can add a patch.

Attachments (1)

53088.diff (720 bytes) - added by paaggeli 5 months ago.

Download all attachments as: .zip

Change History (6)

#1 @mukesh27
5 months ago

  • Owner set to mukesh27
  • Status changed from new to assigned

#2 @SergeyBiryukov
5 months ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to 5.8

#3 @SergeyBiryukov
5 months ago

  • Focuses docs added

@paaggeli
5 months ago

#4 @paaggeli
5 months ago

  • Keywords has-patch added; needs-patch removed

#5 @SergeyBiryukov
5 months ago

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

In 50792:

Docs: Document the usage of $current_user global in get_user_by().

Follow-up to [50790].

Props paaggeli, mukesh27.
Fixes #53088.

Note: See TracTickets for help on using tickets.