mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 05:10:18 +00:00
Docs: In various @return tags, list the expected type first, instead of WP_Error.
See #48303. git-svn-id: https://develop.svn.wordpress.org/trunk@46696 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -118,7 +118,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_Error|bool True if the request has read access, error object otherwise.
|
||||
* @return true|WP_Error True if the request has read access, error object otherwise.
|
||||
*/
|
||||
public function get_items_permissions_check( $request ) {
|
||||
|
||||
@@ -175,7 +175,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
|
||||
*/
|
||||
public function get_items( $request ) {
|
||||
|
||||
@@ -349,7 +349,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return true|WP_Error True if the request has read access for the item, error object otherwise.
|
||||
*/
|
||||
public function get_item_permissions_check( $request ) {
|
||||
$comment = $this->get_comment( $request['id'] );
|
||||
@@ -380,7 +380,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
|
||||
*/
|
||||
public function get_item( $request ) {
|
||||
$comment = $this->get_comment( $request['id'] );
|
||||
@@ -400,7 +400,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return true|WP_Error True if the request has access to create items, error object otherwise.
|
||||
*/
|
||||
public function create_item_permissions_check( $request ) {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
@@ -490,7 +490,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
|
||||
*/
|
||||
public function create_item( $request ) {
|
||||
if ( ! empty( $request['id'] ) ) {
|
||||
@@ -667,7 +667,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return true|WP_Error True if the request has access to update the item, error object otherwise.
|
||||
*/
|
||||
public function update_item_permissions_check( $request ) {
|
||||
$comment = $this->get_comment( $request['id'] );
|
||||
@@ -688,7 +688,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
|
||||
*/
|
||||
public function update_item( $request ) {
|
||||
$comment = $this->get_comment( $request['id'] );
|
||||
@@ -787,7 +787,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return true|WP_Error True if the request has access to delete the item, error object otherwise.
|
||||
*/
|
||||
public function delete_item_permissions_check( $request ) {
|
||||
$comment = $this->get_comment( $request['id'] );
|
||||
@@ -807,7 +807,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @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.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
|
||||
*/
|
||||
public function delete_item( $request ) {
|
||||
$comment = $this->get_comment( $request['id'] );
|
||||
@@ -1691,7 +1691,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* @param string $value Author email value submitted.
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @param string $param The parameter name.
|
||||
* @return WP_Error|string The sanitized email address, if valid,
|
||||
* @return string|WP_Error The sanitized email address, if valid,
|
||||
* otherwise an error.
|
||||
*/
|
||||
public function check_comment_author_email( $value, $request, $param ) {
|
||||
|
||||
Reference in New Issue
Block a user