LLMS_REST_Controller::update_item( WP_REST_Request $request )
Update item.
Parameters Parameters
- $request
-
(WP_REST_Request) (Required) Request object.
Return Return
(WP_REST_Response|WP_Error) Response object or WP_Error on failure.
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-controller.php
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | } $object_type = $this ->get_object_type( $schema ); /** * Filters the disallowed meta fields. * * The dynamic portion of the hook name, `$object_type`, refers the object type this controller is responsible for managing. * * @since 1.0.0-beta.27 * * @param string[] $disallowed_meta_fields Meta field names to skip (added via `register_meta()`). */ $disallowed_meta_fields = apply_filters( "llms_rest_{$object_type}_disallowed_meta_fields" , $this ->disallowed_meta_fields ); $meta = array_diff_key ( $meta , array_flip ( $disallowed_meta_fields ) ); return $meta ; } /** * Get the LLMS REST resource schema base properties, conforming to JSON Schema. * * @since 1.0.0-beta.27 * * @return array */ protected function get_item_schema_base() { |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.12 | Call object_inserted and object_completely_inserted after an object is respectively inserted in the DB and all its additional fields have been updated as well (completely inserted). |
1.0.0-beta.1 | Introduced. |