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.
Use this filter to allow modifying the HTML of the modal button.
Usage
add_filter('frm_modal_link', 'add_attr_modal_btn', 10, 2);
Parameters
- $link (string): The HTML of modal button.
- $atts (array): The modal shortcode attributes.
Examples
Add custom attribute to the modal button
add_filter('frm_modal_link', 'add_attr_modal_btn', 10, 2);
function add_attr_modal_btn( $link, $atts ) {
$link = str_replace( 'data-bs-toggle', 'data-custom-attr="value" data-bs-toggle', $link );
return $link;
}