Contents
Description
The wsf_enqueue_styles action hook runs whenever a form is present on a page and allows you to enqueue custom CSS. This action will only run once per page.
To learn how to enqueue styles in WordPress see: wp_enqueue_style
Usage
add_action( 'wsf_enqueue_styles', 'my_hook_function', 10, 0 );
Example
// Callback function for the wsf_enqueue_styles action hook function my_hook_function() { // CSS file URL $css_file_url = sprintf( '%s/my-custom.css', get_bloginfo( 'template_directory' ) ); // Enqueue CSS file wp_enqueue_style( 'my-custom-css', $css_file_url, array(), false, 'all' ); } // Add a callback function for the wsf_enqueue_styles action hook add_action( 'wsf_enqueue_styles', 'my_hook_function', 10, 0 );
Source File
This hook can be found in:<plugin root>/public/class-ws-form-public.php