buddyforms_front_js_css_loader

The 'buddyforms_front_js_css_loader' filter is called to determine if the BuddyForms JS and CSS should get loaded in the front-end.

By default BuddyForms loads all needed CSS and js if a form gets displayed. BuddyForms checks if a shortcode is fired or if the URL bellows to BuddyForms. 

This makes sure that CSS and JS are only loaded if needed.

If you build a BuddyForms extension and want to load the BuddyForms CSS and JS for your custom component. You can use the filer 'buddyforms_front_js_css_loader'.

If you call the filter and return a true, the CSS and JS will get loaded.

Example

In the BuddyForms Members Extension, we want to load all CSS and JS if the BuddyForms component is displayed.

Still need help? Contact Us Contact Us