LLMS_Question::get_choice( string $id )

Retrieve a choice by id


Parameters Parameters

$id

(string) (Required) Choice ID.


Top ↑

Return Return

(obj|false)


Top ↑

Source Source

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

	public function get_choice( $id ) {
		$choice = new LLMS_Question_Choice( $this->get( 'id' ), $id );
		if ( $choice->exists() && absint( $this->get( 'id' ) ) === absint( $choice->get_question_id() ) ) {
			return $choice;
		}
		return false;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Use strict comparison.
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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