Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#53088 closed enhancement (fixed)

Docs: Add @global current_user to the get_user_by docblock

Reported by: mukesh27's profile mukesh27 Owned by: mukesh27's profile 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 3 years ago.

Download all attachments as: .zip

Change History (6)

#1 @mukesh27
3 years ago

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

#2 @SergeyBiryukov
3 years ago

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

#3 @SergeyBiryukov
3 years ago

  • Focuses docs added

@paaggeli
3 years ago

#4 @paaggeli
3 years ago

  • Keywords has-patch added; needs-patch removed

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