LLMS_Blocks_Reusable::rest_callback_get( array $obj, WP_REST_Request $request )
Read rest field read callback
Parameters Parameters
- $obj
-
(array) (Required) Associative array representing the
wp_block
post. - $request
-
(WP_REST_Request) (Required) Request object.
Return Return
(WP_Error|array) Error when current user isn't authorized to read the data or the post association array on success.
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-reusable.php
public function rest_callback_get( $obj, $request ) { return llms_parse_bool( get_post_meta( $obj['id'], '_is_llms_field', true ) ) ? 'yes' : 'no'; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |