llms_setup_question_data( mixed $post )

When the_post is called, put question data into a global.


Description Description


Parameters Parameters

$post

(mixed) (Required)


Top ↑

Return Return

(LLMS_Question)


Top ↑

Source Source

File: includes/llms.template.functions.php

function llms_setup_question_data( $post ) {
	if ( ! is_admin() ) {

		if ( 'llms_question' == $post->post_type ) {
			unset( $GLOBALS['question'] );

			if ( is_int( $post ) ) {
				$post = get_post( $post ); }

			if ( empty( $post->post_type ) ) {
				return; }

				$GLOBALS['question'] = llms_get_question( $post );

				return $GLOBALS['question'];
		}
	}

}


Top ↑

User Contributed Notes User Contributed Notes

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