-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Description
Hi guys!
Expected/Desired Behavior
When I try to define a custom taxonomy to be used by the story budget like this:
add_filter( 'ef_story_budget_taxonomy_used', 'story_budget_taxonomy_used' );
function story_budget_taxonomy_used(){
return 'custom-taxonomy';
}
Actual Behavior
It works just fine for the postboxes, but the select filter still use the "category" taxonomy because it seems to be hardcoded here:
if ( taxonomy_exists('category') ) {
$category_dropdown_args = array(
'show_option_all' => __( 'View all categories', 'edit-flow' ),
'hide_empty' => 0,
'hierarchical' => 1,
'show_count' => 0,
'orderby' => 'name',
'selected' => $this->user_filters['cat']
);
wp_dropdown_categories( $category_dropdown_args );
Is this expected or could be changed to use the $taxonomy_used
variable?
$category_dropdown_args = array(
'show_option_all' => __( 'View all categories', 'edit-flow' ),
'hide_empty' => 0,
'hierarchical' => 1,
'show_count' => 0,
'orderby' => 'name',
'selected' => $this->user_filters['cat'],
'taxonomy' => $this->taxonomy_used ?? 'category'
);
wp_dropdown_categories( $category_dropdown_args );
Please tell me what's the best way to archive this. Thank you!
flagster76
Metadata
Metadata
Assignees
Labels
No labels