apply_filters( 'learndash_taxonomy_args', array $tax_options, string $tax_slug )
Filters taxonomy arguments.
Description #
Parameters #
- $tax_options
-
(array) An array of taxonomy arguments.
- $tax_slug
-
(string) Taxonomy slug.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for learndash_taxonomy_args filter. */ add_filter( 'learndash_taxonomy_args', function ( $tax_options, $tax_slug ) { // Example 1 Set the custom taxonomy 'ld_course_taxonomy' to public. if ( $tax_slug == 'ld_course_category' ) { $tax_options['tax_args']['public'] = true; } // Always return $tax_options return $tax_options; }, 10, 2 );