WordPress.org

Make WordPress Core

Changeset 44934


Ignore:
Timestamp:
03/19/2019 03:27:45 AM (19 months ago)
Author:
kadamwhite
Message:

REST API: Remove unused attachments controller method.

The validate_user_can_query_private_statuses method is itself unused, and calls a parent class method previously removed in r39104.

Props dlh.
Fixes #45611.

File:
1 edited

Legend:

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

    r44785 r44934  
    701701
    702702    /**
    703      * Validates whether the user can query private statuses.
    704      *
    705      * @since 4.7.0
    706      *
    707      * @param mixed           $value     Status value.
    708      * @param WP_REST_Request $request   Request object.
    709      * @param string          $parameter Additional parameter to pass for validation.
    710      * @return WP_Error|bool True if the user may query, WP_Error if not.
    711      */
    712     public function validate_user_can_query_private_statuses( $value, $request, $parameter ) {
    713         if ( 'inherit' === $value ) {
    714             return true;
    715         }
    716 
    717         return parent::validate_user_can_query_private_statuses( $value, $request, $parameter );
    718     }
    719 
    720     /**
    721703     * Handles an upload via multipart/form-data ($_FILES).
    722704     *
Note: See TracChangeset for help on using the changeset viewer.