Browse: Home / Functions /


learndash_get_quiz_primary_shared( int $quiz_pro_id,  boolean $set_first = true )

Gets the primary quiz post ID from a pro quiz ID.

Description #

This function accepts a list of Quiz posts. It is assumed quiz posts all share the same ProQuiz Quiz ID. This function will determine which is the ‘primary’ quiz post. If one is not found the first in the array will be set as the primary.

Parameters #


(int) (Optional) The ProQuiz Quiz ID. Default 0.


(boolean) (Optional) If true will take first quiz post found and used as primary.

Default value: true

Return #

(int) The primary quiz post ID.

Source #

File: includes/quiz/ld-quiz-functions.php

Changelog #

Version Description
2.6.0 Introduced.