LLMS_Question::get_next_choice_marker()
Retrieve the next marker for question choices.
Return Return
(string)
Source Source
File: includes/models/model.llms.question.php
protected function get_next_choice_marker() {
$next_index = count( $this->get_choices( 'ids', false ) );
$type = $this->get_question_type();
if ( ! is_array( $type['choices'] ?? false ) ) {
return false;
}
$markers = $type['choices']['markers'];
return $next_index > count( $markers ) ? false : $markers[ $next_index ];
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.4.1 | Check $type['choices'] is an array before trying to access it as such. |
| 3.30.1 | Fixed bug which caused the next marker to be 1 index too high. |
| 3.16.0 | Introduced. |