Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#30852 closed defect (bug) (fixed)

Incorrect docs for `user_has_cap` filter

Reported by: dlh Owned by: wonderboymusic
Priority: normal Milestone: 4.2
Component: Role/Capability Version: 3.8
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description

The WP_User::allcaps property is "all capabilities the user has, including individual and role based," but the $allcaps parameter in the "user_has_cap" filter is documented as a role's capabilities. This patch updates the filter to match.

Attachments (1)

30852.patch (653 bytes ) - added by dlh 12 years ago.

Download all attachments as: .zip

Change History (3)

@dlh
12 years ago

#1 @johnbillion
12 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review4.2
  • Summary Inconsistent docs for `WP_User::allcaps`Incorrect docs for `user_has_cap` filter
  • Version trunk3.8

The allcaps property of the WP_User class does indeed represent all of the caps of the user, not the caps of the user's role. Introduced in r26126.

#2 @wonderboymusic
12 years ago

  • Owner set to wonderboymusic
  • Resolutionfixed
  • Status newclosed

In 31013:

Fix docs for WP_User::allcaps:

The allcaps property of the WP_User class represents all of the caps of the user, not the caps of the user's role. Introduced in [26126].

Props dlh.
Fixes #30852.

Note: See TracTickets for help on using tickets.