LLMS_Question_Manager::create_question( array $data = array() )

Create a new question and add it to the quiz

Parameters Parameters


(array) (Optional) array of question data

Default value: array()

Top ↑

Return Return

(false|question) id

Top ↑

Source Source

File: includes/class.llms.question.manager.php

	public function create_question( $data = array() ) {

		// Ensure the question belongs to this quiz.
		$data['parent_id'] = $this->get_parent()->get( 'id' );

		$question = new LLMS_Question( 'new', $data );
		if ( $question->get( 'id' ) ) {
			return $question->get( 'id' );

		return false;


Top ↑

Changelog Changelog

Version Description
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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