apply_filters( 'learndash_courseinfo_quizzes', array $quizzes, array $shortcode_atts )
Filters Quizzes to be included in calculations.
Description #
Parameters #
- $quizzes
-
(array) Array of Quiz IDs to be processed.
- $shortcode_atts
-
(array) Array of shortcode attributes.
Return #
(array) of Quiz IDs.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for learndash_courseinfo_quizzes filter. */ add_filter( 'learndash_courseinfo_quizzes', function ( $quizzes = array(), $shortcode_atts = array() ) { // Example 1: Remove the Quiz ID 4528 from the quizzes array. $quizzes = array_diff( $quizzes, array( 4528 ) ); // Always return $quizzes. return $quizzes; }, 30, 2 );
Changelog #
Version | Description |
---|---|
3.1.2 | Introduced. |