LLMS_Question_Manager::delete_question( int $id )
Delete a question associated with this quiz skips trash and force deletes the question
Parameters Parameters
- $id
-
(int) (Required) WP Post ID of a question (must be associated with this quiz)
Return Return
(boolean) true = deleted, false = error
Source Source
File: includes/class.llms.question.manager.php
public function delete_question( $id ) { $question = $this->get_question( $id ); if ( ! $question ) { return false; } // Error. if ( ! wp_delete_post( $id, true ) ) { return false; } // Deleted. return true; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.0 | Introduced. |