LLMS_Generator::object_created( LLMS_Post_Model|array|WP_User $object )

Record the generation of an object


Parameters Parameters

$object

(LLMS_Post_Model|array|WP_User) (Required) Created object or array.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.generator.php

	public function object_created( $object ) {

		switch ( current_action() ) {

			case 'llms_generator_new_access_plan':
			case 'llms_generator_new_course':
			case 'llms_generator_new_section':
			case 'llms_generator_new_lesson':
			case 'llms_generator_new_quiz':
			case 'llms_generator_new_question':
				$this->record_generation( $object->get( 'id' ), $object->get( 'type' ) );
				break;

			case 'llms_generator_new_user':
				$this->record_generation( $object, 'user' );
				break;

			case 'llms_generator_new_term':
				$this->record_generation( $object['term_id'], 'term' );
				break;

		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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