LLMS_Question_Manager::create_question( array $data = array() )
Create a new question and add it to the quiz
Parameters Parameters
- $data
-
(array) (Optional) array of question data
Default value: array()
Return Return
(false|question) id
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.0 | Introduced. |