I need to add a class to the dropdown topic select_class.
the original function is:
function bbp_get_form_topic_status_dropdown( $args = array() ) {
// Parse arguments against default values
$r = bbp_parse_args( $args, array(
'select_id' => 'bbp_topic_status',
'select_class' => 'bbp_dropdown',
'tab' => false,
'topic_id' => 0,
'selected' => false
), 'topic_open_close_select' );
// Filter & return
return apply_filters( 'bbp_get_form_topic_status_dropdown', ob_get_clean(), $r, $args );
}
I tired to use this but didnt work
function custom_callback($args = array() ) {
$r = bbp_parse_args( $args, array(
'select_class' => 'my-class',
) );
return $r;
}
add_filter( 'bbp_get_form_topic_status_dropdown', 'custom_callback', 12, 2);