This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function add_admin_post_listing_taxonomy_filter( string $post_type, string $taxonomy_name, bool $select_current = false, bool $show_count = true, bool $hide_empty = true ) | |
{ | |
add_action( 'restrict_manage_posts', function( $cur_post_type ) use ( $post_type, $taxonomy_name, $select_current, $show_count, $hide_empty ) { | |
global $wpdb; | |
if ( $post_type !== $cur_post_type ) { | |
return; | |
} | |
$taxonomy = get_taxonomy( $taxonomy_name ); |