Description
apply_filters( 'wcv_select2_args_' . $field[ 'taxonomy' ], array( $attributes ) )
Parameters (1) (array)
Sample
array( 'pad_counts' => 1, 'show_count' => 0, 'hierarchical' => 1, 'hide_empty' => 1, 'fields' => 'all', 'show_uncategorized' => 1, 'orderby' => 'name', 'selected' => $selected, 'menu_order' => false, 'value' => 'id' )
Usage Examples
To run the filter, copy this sample
$array_val = apply_filters( 'wcv_select2_args_' . $field[ 'taxonomy' ], $param ); if ( ! empty( $array_val ) ) { // what has been modified... }
To make a callback function, copy this sample
// the filter wcv_select2_args_ $field[ 'taxonomy' ] callback function my_filter_function( 'wcv_select2_args_' . $field[ 'taxonomy' ], $param ) { // do your thing here :-) ... return $array_val; } add_filter( 'wcv_select2_args_' . $field[taxonomy], 'my_filter_function', 10, 1 );
To remove the filter, copy this sample
//remove the filter remove_filter( 'wcv_select2_args_' . $field[taxonomy], 'my_filter_function', 10, 1 );
Defined
This filter is defined in the following source file(s)
- wcvendors-pro/public/class-wcvendors-pro-form-helper.php line 317
$defaults = apply_filters( 'wcv_select2_args_' . $field[ 'taxonomy' ], array(