WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#35080 closed defect (bug) (fixed)

Update documentation in return value for WP_Role has_cap() method

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

Description

The current documentation for return value says "if user has capability". This should say "if role has capability".

Attachments (1)

35080.diff (516 bytes) - added by GunGeekATX 5 years ago.
Updated documentation in return value

Download all attachments as: .zip

Change History (3)

@GunGeekATX
5 years ago

Updated documentation in return value

#1 @DrewAPicture
5 years ago

  • Focuses docs added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.5

Hi @GunGeekATX, thanks for the patch!

#2 @DrewAPicture
5 years ago

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

In 35935:

Docs: Clarify documentation for WP_Role::has_cap() to more clearing indicate that the method checks for capabilities against the role rather than the user.

Also updates syntax in the DocBlock summary and description.

Props GunGeekATX for the initial patch.
Fixes #35080.

Note: See TracTickets for help on using tickets.