apply_filters( 'learndash_settings_metaboxes_legacy_quiz', boolean $show_legacy_quiz, string $post_type )
Filters whether to show legacy quiz metaboxes or not.
Description #
Parameters #
- $show_legacy_quiz
-
(boolean) Whether to show legacy quiz metabox or not.
- $post_type
-
(string) Post type slug.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_settings_metaboxes_legacy_quiz filter.
*/
add_filter(
'learndash_settings_metaboxes_legacy_quiz',
function( $show_legacy_quiz, $post_type ) {
// May add any custom logic using $show_legacy_quiz, $post_type.
// Always return $show_legacy_quiz.
return $show_legacy_quiz;
},
10,
2
);
Changelog #
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |