LLMS_Blocks_Reusable::rest_callback_update( array $value, WP_Post $obj, string $key )
Rest field update callback
Parameters Parameters
- $value
-
(array) (Required) Post association array.
- $obj
-
(WP_Post) (Required) Post object for the
wp_block
post. - $key
-
(string) (Required) Field key.
Return Return
(WP_Error|boolean) Returns an error object when current user lacks permission to update the form or true
on success.
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-reusable.php
public function rest_callback_update( $value, $obj, $key ) { $value = llms_parse_bool( $value ) ? 'yes' : 'no'; return update_post_meta( $obj->ID, '_is_llms_field', $value ) ? true : false; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |