WP_REST_Controller::update_item_permissions_check()publicWP 4.7.0

Checks if a given request has access to update a specific item.

Метод класса: WP_REST_Controller{}

Хуков нет.


true|WP_Error. True if the request has access to update the item, WP_Error object otherwise.


$WP_REST_Controller = new WP_REST_Controller();
$WP_REST_Controller->update_item_permissions_check( $request );
$request(WP_REST_Request) (обязательный)
Full details about the request.

Список изменений

С версии 4.7.0 Введена.

Код WP_REST_Controller::update_item_permissions_check() WP 6.6

public function update_item_permissions_check( $request ) {
	return new WP_Error(
		/* translators: %s: Method name. */
		sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ),
		array( 'status' => 405 )