mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -20,7 +20,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Post type.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $post_type;
|
||||
@@ -29,7 +28,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Instance of a post meta fields object.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
* @var WP_REST_Post_Meta_Fields
|
||||
*/
|
||||
protected $meta;
|
||||
@@ -38,7 +36,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Constructor.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $post_type Post type.
|
||||
*/
|
||||
@@ -55,7 +52,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Registers the routes for the objects of the controller.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @see register_rest_route()
|
||||
*/
|
||||
@@ -126,7 +122,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to read posts.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
|
||||
@@ -146,7 +141,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Retrieves a collection of posts.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
|
||||
@@ -389,7 +383,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to read a post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return bool|WP_Error True if the request has read access for the item, WP_Error object otherwise.
|
||||
@@ -430,7 +423,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* check in core with a filter.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_Post $post Post to check against.
|
||||
* @param WP_REST_Request $request Request data to check.
|
||||
@@ -460,7 +452,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Retrieves a single post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
|
||||
@@ -485,7 +476,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to create a post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return true|WP_Error True if the request has access to create items, WP_Error object otherwise.
|
||||
@@ -520,7 +510,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Creates a single post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
|
||||
@@ -624,7 +613,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to update a post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return true|WP_Error True if the request has access to update the item, WP_Error object otherwise.
|
||||
@@ -660,7 +648,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Updates a single post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
|
||||
@@ -748,7 +735,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to delete a post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
|
||||
@@ -770,7 +756,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Deletes a single post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
|
||||
@@ -860,7 +845,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* them for WP_Query.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param array $prepared_args Optional. Prepared WP_Query arguments. Default empty array.
|
||||
* @param WP_REST_Request $request Optional. Full details about the request.
|
||||
@@ -907,7 +891,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* modified date for single post output.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param string $date_gmt GMT publication time.
|
||||
* @param string|null $date Optional. Local publication time. Default null.
|
||||
@@ -932,7 +915,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Prepares a single post for create or update.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param WP_REST_Request $request Request object.
|
||||
* @return stdClass|WP_Error Post object or WP_Error.
|
||||
@@ -1106,7 +1088,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Determines validity and normalizes the given status parameter.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param string $post_status Post status.
|
||||
* @param object $post_type Post type.
|
||||
@@ -1143,7 +1124,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Determines the featured media based on a request param.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param int $featured_media Featured Media ID.
|
||||
* @param int $post_id Post ID.
|
||||
@@ -1169,7 +1149,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Sets the template for a post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $template Page template filename.
|
||||
* @param integer $post_id Post ID.
|
||||
@@ -1186,7 +1165,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Updates the post's terms from a REST request.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param int $post_id The post ID to update the terms form.
|
||||
* @param WP_REST_Request $request The request object with post and terms data.
|
||||
@@ -1214,7 +1192,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks whether current user can assign all terms sent with the current request.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param WP_REST_Request $request The request object with post and terms data.
|
||||
* @return bool Whether the current user can assign the provided terms.
|
||||
@@ -1247,7 +1224,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a given post type can be viewed or managed.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param object|string $post_type Post type name or object.
|
||||
* @return bool Whether the post type is allowed in REST.
|
||||
@@ -1270,7 +1246,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Correctly handles posts with the inherit status.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param object $post Post object.
|
||||
* @return bool Whether the post can be read.
|
||||
@@ -1314,7 +1289,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a post can be edited.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param object $post Post object.
|
||||
* @return bool Whether the post can be edited.
|
||||
@@ -1333,7 +1307,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a post can be created.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param object $post Post object.
|
||||
* @return bool Whether the post can be created.
|
||||
@@ -1352,7 +1325,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Checks if a post can be deleted.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param object $post Post object.
|
||||
* @return bool Whether the post can be deleted.
|
||||
@@ -1371,7 +1343,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Prepares a single post output for response.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_Post $post Post object.
|
||||
* @param WP_REST_Request $request Request object.
|
||||
@@ -1588,7 +1559,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* in a machine readable format, we remove the "Protected: " prefix.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return string Protected title format.
|
||||
*/
|
||||
@@ -1600,7 +1570,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Prepares links for the request.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param WP_Post $post Post object.
|
||||
* @return array Links for the given post.
|
||||
@@ -1709,7 +1678,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Retrieves the post's schema, conforming to JSON Schema.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Item schema data.
|
||||
*/
|
||||
@@ -2048,7 +2016,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* Retrieves the query params for the posts collection.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Collection parameters.
|
||||
*/
|
||||
@@ -2243,7 +2210,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* user can query private statuses.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param string|array $statuses One or more post statuses.
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
|
||||
Reference in New Issue
Block a user