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)


Top ↑

Return Return

(boolean) true = deleted, false = error


Top ↑

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;

	}


Top ↑

Changelog 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.