LLMS_REST_Database_Resource::create( array $data )
Create a new Resource
Parameters Parameters
- $data
-
(array) (Required) Associative array of data to set to the resource's properties.
Return Return
(WP_Error|obj)
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-database-resource.php
public function create( $data ) { $data = $this->create_prepare( $data ); if ( is_wp_error( $data ) ) { return $data; } return $this->save( new $this->model(), $data ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |