Title: WP_REST_Posts_Controller::check_update_permission
Published: December 6, 2016
Last modified: May 20, 2026

---

# WP_REST_Posts_Controller::check_update_permission( WP_Post $post ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#wp--skip-link--target)

Checks if a post can be edited.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#parameters)󠁿

 `$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)required

Post object.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#return)󠁿

 bool Whether the post can be edited.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#source)󠁿

    ```php
    protected function check_update_permission( $post ) {
    	$post_type = get_post_type_object( $post->post_type );

    	if ( ! $this->check_is_post_type_allowed( $post_type ) ) {
    		return false;
    	}

    	return current_user_can( 'edit_post', $post->ID );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php#L1827)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php#L1827-L1835)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_REST_Posts_Controller::check_is_post_type_allowed()](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_is_post_type_allowed/)`wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php` |

Checks if a given post type can be viewed or managed.

  | 
| [current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)`wp-includes/capabilities.php` |

Returns whether the current user has the specified capability.

  | 
| [get_post_type_object()](https://developer.wordpress.org/reference/functions/get_post_type_object/)`wp-includes/post.php` |

Retrieves a post type object by name.

  |

[Show 1 more](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#)

| Used by | Description | 
| [WP_REST_Posts_Controller::update_item_permissions_check()](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/update_item_permissions_check/)`wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php` |

Checks if a given request has access to update a post.

  | 
| [WP_REST_Posts_Controller::get_item_permissions_check()](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/get_item_permissions_check/)`wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php` |

Checks if a given request has access to read a post.

  | 
| [WP_REST_Posts_Controller::get_items()](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/get_items/)`wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php` |

Retrieves a collection of posts.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_rest_posts_controller/check_update_permission/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.7.0](https://developer.wordpress.org/reference/since/4.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_rest_posts_controller%2Fcheck_update_permission%2F)
before being able to contribute a note or feedback.