Docs: Remove @access notations from method DocBlocks in wp-includes/* classes.

Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.


git-svn-id: https://develop.svn.wordpress.org/trunk@41162 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes
2017-07-27 00:40:27 +00:00
parent 829139ba1a
commit b4d81bd654
135 changed files with 2 additions and 1906 deletions

View File

@@ -18,7 +18,6 @@ abstract class WP_REST_Controller {
* The namespace of this controller's route.
*
* @since 4.7.0
* @access protected
* @var string
*/
protected $namespace;
@@ -27,7 +26,6 @@ abstract class WP_REST_Controller {
* The base of this controller's route.
*
* @since 4.7.0
* @access protected
* @var string
*/
protected $rest_base;
@@ -36,7 +34,6 @@ abstract class WP_REST_Controller {
* Registers the routes for the objects of the controller.
*
* @since 4.7.0
* @access public
*/
public function register_routes() {
_doing_it_wrong( 'WP_REST_Controller::register_routes', __( 'The register_routes() method must be overridden' ), '4.7' );
@@ -46,7 +43,6 @@ abstract class WP_REST_Controller {
* Checks if a given request has access to get items.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|bool True if the request has read access, WP_Error object otherwise.
@@ -59,7 +55,6 @@ abstract class WP_REST_Controller {
* Retrieves a collection of items.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
@@ -72,7 +67,6 @@ abstract class WP_REST_Controller {
* Checks if a given request has access to get a specific item.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.
@@ -85,7 +79,6 @@ abstract class WP_REST_Controller {
* Retrieves one item from the collection.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
@@ -98,7 +91,6 @@ abstract class WP_REST_Controller {
* Checks if a given request has access to create items.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|bool True if the request has access to create items, WP_Error object otherwise.
@@ -111,7 +103,6 @@ abstract class WP_REST_Controller {
* Creates one item from the collection.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
@@ -124,7 +115,6 @@ abstract class WP_REST_Controller {
* Checks if a given request has access to update a specific item.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|bool True if the request has access to update the item, WP_Error object otherwise.
@@ -137,7 +127,6 @@ abstract class WP_REST_Controller {
* Updates one item from the collection.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
@@ -150,7 +139,6 @@ abstract class WP_REST_Controller {
* Checks if a given request has access to delete a specific item.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|bool True if the request has access to delete the item, WP_Error object otherwise.
@@ -163,7 +151,6 @@ abstract class WP_REST_Controller {
* Deletes one item from the collection.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Full data about the request.
* @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
@@ -176,7 +163,6 @@ abstract class WP_REST_Controller {
* Prepares one item for create or update operation.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Request $request Request object.
* @return WP_Error|object The prepared item, or WP_Error object on failure.
@@ -189,7 +175,6 @@ abstract class WP_REST_Controller {
* Prepares the item for the REST response.
*
* @since 4.7.0
* @access public
*
* @param mixed $item WordPress representation of the item.
* @param WP_REST_Request $request Request object.
@@ -203,7 +188,6 @@ abstract class WP_REST_Controller {
* Prepares a response for insertion into a collection.
*
* @since 4.7.0
* @access public
*
* @param WP_REST_Response $response Response object.
* @return array|mixed Response data, ready for insertion into collection data.
@@ -233,7 +217,6 @@ abstract class WP_REST_Controller {
* Filters a response based on the context defined in the schema.
*
* @since 4.7.0
* @access public
*
* @param array $data Response data to fiter.
* @param string $context Context defined in the schema.
@@ -275,7 +258,6 @@ abstract class WP_REST_Controller {
* Retrieves the item's schema, conforming to JSON Schema.
*
* @since 4.7.0
* @access public
*
* @return array Item schema data.
*/
@@ -287,7 +269,6 @@ abstract class WP_REST_Controller {
* Retrieves the item's schema for display / public consumption purposes.
*
* @since 4.7.0
* @access public
*
* @return array Public item schema data.
*/
@@ -306,7 +287,6 @@ abstract class WP_REST_Controller {
* Retrieves the query params for the collections.
*
* @since 4.7.0
* @access public
*
* @return array Query parameters for the collection.
*/
@@ -345,7 +325,6 @@ abstract class WP_REST_Controller {
* Ensures consistent descriptions between endpoints, and populates enum from schema.
*
* @since 4.7.0
* @access public
*
* @param array $args Optional. Additional arguments for context parameter. Default empty array.
* @return array Context parameter details.
@@ -384,7 +363,6 @@ abstract class WP_REST_Controller {
* Adds the values from additional fields to a data object.
*
* @since 4.7.0
* @access protected
*
* @param array $object Data object.
* @param WP_REST_Request $request Full details about the request.
@@ -410,7 +388,6 @@ abstract class WP_REST_Controller {
* Updates the values of additional fields added to a data object.
*
* @since 4.7.0
* @access protected
*
* @param array $object Data Object.
* @param WP_REST_Request $request Full details about the request.
@@ -445,7 +422,6 @@ abstract class WP_REST_Controller {
* The type of object is inferred from the passed schema.
*
* @since 4.7.0
* @access protected
*
* @param array $schema Schema array.
* @return array Modified Schema array.
@@ -475,7 +451,6 @@ abstract class WP_REST_Controller {
* Retrieves all of the registered additional fields for a given object-type.
*
* @since 4.7.0
* @access protected
*
* @param string $object_type Optional. The object type.
* @return array Registered additional fields (if any), empty array if none or if the object type could
@@ -504,7 +479,6 @@ abstract class WP_REST_Controller {
* Retrieves the object type this controller is responsible for managing.
*
* @since 4.7.0
* @access protected
*
* @return string Object type for the controller.
*/
@@ -522,7 +496,6 @@ abstract class WP_REST_Controller {
* Retrieves an array of endpoint arguments from the item schema for the controller.
*
* @since 4.7.0
* @access public
*
* @param string $method Optional. HTTP method of the request. The arguments for `CREATABLE` requests are
* checked for required values and may fall-back to a given default, this is not done
@@ -584,7 +557,6 @@ abstract class WP_REST_Controller {
* Sanitizes the slug value.
*
* @since 4.7.0
* @access public
*
* @internal We can't use sanitize_title() directly, as the second
* parameter is the fallback title, which would end up being set to the