Browse: Home / Hooks /

ld_{$post_type_slug}_categorydropdown

apply_filters( "ld_{$post_type_slug}_categorydropdown",  string $categorydropdown,  array $atts,  array $filter )

Filters the HTML output of category dropdown for any post type slug.


Description #

The dynamic part of the hook $post_type_slug refers to the slug of any post type.


Parameters #

$categorydropdown

(string) HTML markup for category dropdown.

$atts

(array) Combined and filtered attribute list.

$filter

(array) Query arguments.


Source #

File: includes/shortcodes/ld_course_list.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for ld_{$post_type_slug}_categorydropdown filter.
 */
add_filter(
	'ld_course_categorydropdown',
	function( $categorydropdown, $atts, $filter ) {
		// May add any custom logic using $categorydropdown, $atts, $filter.

		// Always return $categorydropdown.
		return $categorydropdown;
	},
	10,
	3
);
 

Changelog #

Changelog
Version Description
2.1.0 Introduced.