learndash_taxonomy_args

apply_filters( 'learndash_taxonomy_args',  array $tax_options )

Filters taxonomy arguments.


Description #


Parameters #

$tax_options

(array) An array of taxonomy arguments.


Source #

File: includes/class-ld-lms.php


Examples #

 <?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
);