LLMS_Blocks_Post_Visibility::get_callback( array $obj, WP_REST_Request $request )
Retrieve visibility information for a give object.
Parameters Parameters
- $obj
-
(array) (Required) Assoc. array of WP_Post data.
- $request
-
(WP_REST_Request) (Required) Full details about the request.
Return Return
(WP_Error|string) Visibility term slug or WP_Error object.
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-post-visibility.php
public function get_callback( $obj, $request ) { $ret = array(); $obj = new LLMS_Product( $obj['id'] ); if ( $obj ) { $ret = $obj->get_catalog_visibility(); } return $ret; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.3.0 | Introduced. |