Make WordPress Core

Changeset 56415


Ignore:
Timestamp:
08/18/2023 05:44:29 PM (18 months ago)
Author:
johnbillion
Message:

REST API: Correct the docblocks for various permission related methods.

See #58833

Location:
trunk/src/wp-includes/rest-api/endpoints
Files:
6 edited

Legend:

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

    r56093 r56415  
    5858     *
    5959     * @param WP_REST_Request $request Full details about the request.
    60      * @return bool|WP_Error True if the request has read access for the item, WP_Error object otherwise.
     60     * @return bool|WP_Error True if the request has read access for the item, WP_Error object or false otherwise.
    6161     */
    6262    public function get_item_permissions_check( $request ) {
     
    7878     *
    7979     * @param WP_REST_Request $request Full details about the request.
    80      * @return bool|WP_Error Whether the current user has permission.
     80     * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
    8181     */
    8282    protected function check_has_read_only_access( $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-locations-controller.php

    r53760 r56415  
    121121     *
    122122     * @param WP_REST_Request $request Full details about the request.
    123      * @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.
     123     * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
    124124     */
    125125    public function get_item_permissions_check( $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php

    r56093 r56415  
    4141     *
    4242     * @param WP_REST_Request $request Full details about the request.
    43      * @return bool|WP_Error True if the request has read access for the item, otherwise false or WP_Error object.
     43     * @return true|WP_Error True if the request has read access for the item, otherwise WP_Error object.
    4444     */
    4545    public function get_item_permissions_check( $request ) {
     
    8282     *
    8383     * @param WP_REST_Request $request Full details about the request.
    84      * @return bool|WP_Error Whether the current user has permission.
     84     * @return true|WP_Error True if the current user has permission, WP_Error object otherwise.
    8585     */
    8686    protected function check_has_read_only_access( $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r56193 r56415  
    476476     *
    477477     * @param WP_REST_Request $request Full details about the request.
    478      * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
     478     * @return bool|WP_Error True if the request has read access for the item, WP_Error object or false otherwise.
    479479     */
    480480    public function get_item_permissions_check( $request ) {
     
    15071507     * @param string          $template Page template filename.
    15081508     * @param WP_REST_Request $request  Request.
    1509      * @return bool|WP_Error True if template is still valid or if the same as existing value, or false if template not supported.
     1509     * @return true|WP_Error True if template is still valid or if the same as existing value, or a WP_Error if template not supported.
    15101510     */
    15111511    public function check_template( $template, $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r54891 r56415  
    180180     *
    181181     * @param WP_REST_Request $request Full details about the request.
    182      * @return true|WP_Error True if the request has read access, otherwise false or WP_Error object.
     182     * @return bool|WP_Error True if the request has read access, otherwise false or WP_Error object.
    183183     */
    184184    public function get_items_permissions_check( $request ) {
     
    418418     *
    419419     * @param WP_REST_Request $request Full details about the request.
    420      * @return true|WP_Error True if the request has read access for the item, otherwise false or WP_Error object.
     420     * @return true|WP_Error True if the request has read access for the item, otherwise WP_Error object.
    421421     */
    422422    public function get_item_permissions_check( $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php

    r55951 r56415  
    119119     *
    120120     * @param WP_REST_Request $request Full details about the request.
    121      * @return bool|WP_Error True if the request has read access for the item, otherwise WP_Error object.
     121     * @return true|WP_Error True if the request has read access for the item, otherwise WP_Error object.
    122122     */
    123123    public function get_item_permissions_check( $request ) {
     
    145145     * @since 5.7.0
    146146     *
    147      * @return bool|WP_Error Whether the theme can be read.
     147     * @return true|WP_Error True if the theme can be read, WP_Error object otherwise.
    148148     */
    149149    protected function check_read_active_theme_permission() {
Note: See TracChangeset for help on using the changeset viewer.