LLMS_REST_Controller_Stubs::create_object( array $prepared, WP_REST_Request $request )

Insert the prepared data into the database.

Parameters Parameters


(array) (Required) Prepared item data.


(WP_REST_Request) (Required) Request object.

Top ↑

Return Return

(obj) Object Instance of object from $this->get_object().

Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-controller-stubs.php

	protected function create_object( $prepared, $request ) {

		// @todo: add version to message.

		// Translators: %s = method name.
		_doing_it_wrong( 'LLMS_REST_Controller::create_object', sprintf( __( "Method '%s' must be overridden.", 'lifterlms' ), __METHOD__ ), '1.0.0-beta.1' );

		// For example.
		return $this->get_object( $this->get_object_id( $prepared ) );


Top ↑

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.