LLMS_REST_Posts_Controller::update_item( WP_REST_Request $request )

Updates a single llms post.


Description Description

Extending classes can add additional object fields by overriding the method update_additional_object_fields().


Parameters Parameters

$request

(Required) Full details about the request.


Top ↑

Return Return

(WP_REST_Response|WP_Error) Response object on success, or WP_Error object on failure.


Top ↑

Source Source

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


			

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.7 Don't execute $object->set_bulk() when there's no data to update: this fixes an issue when updating only properties which are not handled in prepare_item_for_database(). Added "llms_rest_insert_{$this->post_type}" and "llms_rest_insert_{$this->post_type}" action hooks: fired after inserting/uodateing an llms post into the database.
1.0.0-beta.11 Fixed "llms_rest_insert_{$this->post_type}" and "llms_rest_insert_{$this->post_type}" action hooks fourth param: must be false when updating.
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.