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.
When a form is loaded with ajax, the scripts and styles are prevented from loading. If you have a style you would like loaded when a form is rendered with ajax, you can allow it with this hook.
Usage
add_filter('frm_ajax_load_styles', 'frm_ajax_load_styles'); function frm_ajax_load_styles($styles)
Parameters
- $styles (array)
Examples
Load a style
add_filter('frm_ajax_load_styles', 'frm_ajax_load_styles');
function frm_ajax_load_styles($styles){
$styles[] = 'dashicons'; // change this to the enqueued name of the style to load
return $styles;
}