LLMS_REST_Posts_Controller::create_llms_post( array $object_args )
Create an LLMS_Post_Model
Parameters Parameters
- $object_args
-
(array) (Required) Object args.
Return Return
(LLMS_Post_Model|WP_Error)
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 | return new WP_Error( 'llms_rest_cannot_get_object' , /* translators: %s: post type */ sprintf( __( 'The %s cannot be retrieved.' , 'lifterlms' ), $this ->post_type ), array ( 'status' => 500 ) ); } $object = llms_get_post( $id ); return $object && is_a ( $object , $class ) ? $object : llms_rest_not_found_error(); } /** * Create an LLMS_Post_Model * * @since 1.0.0-beta.1 |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.9 | Implement generic llms post creation. |
1.0.0-beta.1 | Introduced. |