WP_REST_Global_Styles_Controller::check_update_permission() – Checks if a global style can be edited.

You appear to be a bot. Output may be restricted

Description

Checks if a global style can be edited.

Usage

$bool = WP_REST_Global_Styles_Controller::check_update_permission( $post );

Parameters

$post
( WP_Post ) required – Post object.

Returns

bool Whether the post can be edited.

Source

File name: wordpress/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
Lines:

1 to 3 of 3
  protected function check_update_permission( $post ) {
    return current_user_can( 'edit_post', $post->ID );
  }
 

 View on GitHub View on Trac