WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/04/2021 05:16:43 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Docs: In various @return tags, list the expected type first, instead of false or WP_Error.

Follow-up to [46696], [47060], [49926], [49927].

See #51800.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php

    r49927 r49929  
    115115     *
    116116     * @param WP_REST_Request $request Full details about the request.
    117      * @return WP_Error|true True if the request has read access, WP_Error object otherwise.
     117     * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
    118118     */
    119119    public function get_items_permissions_check( $request ) {
     
    127127     *
    128128     * @param WP_REST_Request $request Full details about the request.
    129      * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     129     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    130130     */
    131131    public function get_items( $request ) {
     
    161161     *
    162162     * @param WP_REST_Request $request Full details about the request.
    163      * @return WP_Error|true True if the request has read access for the item, WP_Error object otherwise.
     163     * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
    164164     */
    165165    public function get_item_permissions_check( $request ) {
     
    182182     * @since 5.5.0
    183183     *
    184      * @return WP_Error|true True if the block type is visible, WP_Error otherwise.
     184     * @return true|WP_Error True if the block type is visible, WP_Error otherwise.
    185185     */
    186186    protected function check_read_permission() {
     
    220220     *
    221221     * @param WP_REST_Request $request Full details about the request.
    222      * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     222     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    223223     */
    224224    public function get_item( $request ) {
Note: See TracChangeset for help on using the changeset viewer.