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 filter allows to modify the HTML attributes of radio inputs in FrmAppHelper::images_dropdown() method.
Usage
add_filter( 'frm_images_dropdown_input_attrs', 'my_custom_function');
Parameters
- $input_attrs (string): The HTML attributes string.
- $args (array): The arguments of images_dropdown() method after filling defaults.
Examples
Add custom HTML attribute to radio inputs
add_filter( 'frm_images_dropdown_input_attrs', 'add_html_attrs_radio_image_dropdown', 10, 2);
function add_html_attrs_radio_image_dropdown( $input_attrs, $args ) {
$input_attrs .= ' data-custom-value="Custom value"';
return $input_attrs;
}