Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook allows to modify the CSS classes of each option in FrmAppHelper::images_dropdown() method.
Usage
add_filter( 'frm_images_dropdown_option_classes', 'my_custom_function');
Parameters
- $classes (string): CSS classes.
- $args (array): The arguments of images_dropdown() method after filling defaults and adding option array.
Examples
Add custom CSS class to each option
add_filter( 'frm_images_dropdown_option_classes', 'add_css_class_image_dropdown', 10, 2);
function add_css_class_image_dropdown( $classes, $args ) {
$classes .= ' your-custom-class';
return $classes;
}