Making WordPress.org

Opened 8 years ago

Closed 8 years ago

#2344 closed defect (bug) (fixed)

Show private banner for class methods that are private

Reported by: coffee2code's profile coffee2code Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords:
Cc:

Description

The current banner that displays for private functions does not display for private class methods not explicitly documented with @access private. This is due to two things:

  1. get_private_access_message() does not handle wp-parser-method posts (it needs to be whitelisted)
  2. Even once get_private_access_message() handles the post type, the function needs to fall back to checking the post's '_wp-parser_visibility' meta field to see if it was defined with an access modifier of 'private'.

Example: https://developer.wordpress.org/reference/classes/_wp_editors/get_translation/

Change History (2)

#1 @coffee2code
8 years ago

In 4580:

developer.wordpress.org: Enable private message notice for class methods.

See #2344.

#2 @coffee2code
8 years ago

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

In 4581:

developer.wordpress.org: Also check access modifier to determine if function or class method is private.

Fixes #2344.

Note: See TracTickets for help on using tickets.