WordPress.org

Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#42589 new enhancement

Add missing "third argument" documentation to user_can()

Reported by: mariovalney Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: has-patch
Focuses: docs Cc:

Description

There is an undocumented, third argument, $args, into user_can() function as written in Roles and Capabilities section of Plugin Handbook.

It's the same of current_user_can() (already documented).

Attachments (1)

42589.diff (1.7 KB) - added by mariovalney 4 weeks ago.

Download all attachments as: .zip

Change History (4)

@mariovalney
4 weeks ago

#1 @mariovalney
4 weeks ago

  • Keywords has-patch added

Added 42589.diff merging the current description of user_can and the well-documented current_user_can.

#2 @johnbillion
4 weeks ago

Thanks for the patch, @mariovalney.

This is very closely related to #37402, because the third parameter is actually variadic.

#3 @johnbillion
4 weeks ago

  • Milestone changed from Awaiting Review to 5.0
  • Version trunk deleted
Note: See TracTickets for help on using tickets.