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.


Top ↑

Return Return

(WP_Error|obj)


Top ↑

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 );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.