LLMS_Question::is_orphan()

Determine if the question is an orphan


Return Return

(bool)


Top ↑

Source Source

File: includes/models/model.llms.question.php

	public function is_orphan() {

		$statuses  = array( 'publish', 'draft' );
		$parent_id = $this->get( 'parent_id' );

		if ( ! $parent_id ) {
			return true;
		} elseif ( ! in_array( get_post_status( $parent_id ), $statuses, true ) ) {
			return true;
		}

		return false;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.27.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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