LLMS_REST_Posts_Controller::delete_item_permissions_check( WP_REST_Request $request )

Check if a given request has access to delete an item.


Parameters Parameters

$request

(WP_REST_Request) (Required) Full details about the request.


Top ↑

Return Return

(bool|WP_Error)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php

	 *
	 * @since 1.0.0-beta.1
	 * @since 1.0.0-beta.7 return description updated.
	 *
	 * @param LLMS_Post_Model $object        LMMS_Post_Model instance.
	 * @param array           $prepared_item Array.
	 * @param WP_REST_Request $request       Full details about the request.
	 * @param array           $schema        The item schema.
	 * @return bool|WP_Error True on success or false if nothing to update, WP_Error object if something went wrong during the update.
	 */
	protected function update_additional_object_fields( $object, $prepared_item, $request, $schema ) {
		return true;
	}

	/**
	 * Check if a given request has access to delete an item.
	 *
	 * @since 1.0.0-beta.1
	 * @since 1.0.0-beta.18 Provide a more significant error message when trying to delete an item without permissions.
	 *
	 * @param  WP_REST_Request $request Full details about the request.
	 * @return bool|WP_Error
	 */
	public function delete_item_permissions_check( $request ) {



Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.18 Provide a more significant error message when trying to delete an item without permissions.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.