mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +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_Comments_Controller extends WP_REST_Controller {
|
||||
* Instance of a comment meta fields object.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
* @var WP_REST_Comment_Meta_Fields
|
||||
*/
|
||||
protected $meta;
|
||||
@@ -29,7 +28,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Constructor.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->namespace = 'wp/v2';
|
||||
@@ -42,7 +40,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Registers the routes for the objects of the controller.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*/
|
||||
public function register_routes() {
|
||||
|
||||
@@ -111,7 +108,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to read comments.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|bool True if the request has read access, error object otherwise.
|
||||
@@ -164,7 +160,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Retrieves a list of comment items.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
|
||||
@@ -339,7 +334,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to read the comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|bool True if the request has read access for the item, error object otherwise.
|
||||
@@ -371,7 +365,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Retrieves a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
|
||||
@@ -392,7 +385,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to create a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|bool True if the request has access to create items, error object otherwise.
|
||||
@@ -480,7 +472,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Creates a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
|
||||
@@ -648,7 +639,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks if a given REST request has access to update a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|bool True if the request has access to update the item, error object otherwise.
|
||||
@@ -670,7 +660,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Updates a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
|
||||
@@ -767,7 +756,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks if a given request has access to delete a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|bool True if the request has access to delete the item, error object otherwise.
|
||||
@@ -788,7 +776,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Deletes a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
|
||||
@@ -857,7 +844,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Prepares a single comment output for response.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_Comment $comment Comment object.
|
||||
* @param WP_REST_Request $request Request object.
|
||||
@@ -923,7 +909,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Prepares links for the request.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param WP_Comment $comment Comment object.
|
||||
* @return array Links for the given comment.
|
||||
@@ -992,7 +977,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Prepends internal property prefix to query parameters to match our response fields.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param string $query_param Query parameter.
|
||||
* @return string The normalized query parameter.
|
||||
@@ -1025,7 +1009,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks comment_approved to set comment status for single comment output.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param string|int $comment_approved comment status.
|
||||
* @return string Comment status.
|
||||
@@ -1057,7 +1040,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Prepares a single comment to be inserted into the database.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param WP_REST_Request $request Request object.
|
||||
* @return array|WP_Error Prepared comment, otherwise WP_Error object.
|
||||
@@ -1153,7 +1135,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Retrieves the comment's schema, conforming to JSON Schema.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -1313,7 +1294,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Retrieves the query params for collections.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return array Comments collection parameters.
|
||||
*/
|
||||
@@ -1471,7 +1451,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Sets the comment_status of a given comment object when creating or updating a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param string|int $new_status New comment status.
|
||||
* @param int $comment_id Comment ID.
|
||||
@@ -1520,7 +1499,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Correctly handles posts with the inherit status.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param WP_Post $post Post object.
|
||||
* @param WP_REST_Request $request Request data to check.
|
||||
@@ -1558,7 +1536,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks if the comment can be read.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param WP_Comment $comment Comment object.
|
||||
* @param WP_REST_Request $request Request data to check.
|
||||
@@ -1593,7 +1570,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks if a comment can be edited or deleted.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param object $comment Comment object.
|
||||
* @return bool Whether the comment can be edited or deleted.
|
||||
@@ -1618,7 +1594,6 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* string is allowed when a comment is being updated.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $value Author email value submitted.
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
|
||||
Reference in New Issue
Block a user