Created
February 17, 2015 08:23
-
-
Save schalkburger/9ec0103f698d12ca167f to your computer and use it in GitHub Desktop.
Contact Form 7 custom loading image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Custom loading image | |
add_filter('wpcf7_ajax_loader', 'my_wpcf7_ajax_loader'); | |
function my_wpcf7_ajax_loader () { | |
return get_bloginfo('stylesheet_directory') . '/img/ajax-loader.gif'; | |
} | |
?> |
Looks like they've restructured how it works, the loader is now the background of a span so it can be customised just using css. This kind of thing:
div.wpcf7 form.wpcf7-form span.ajax-loader {width: 32px; height: 32px; background-image:url(../images/custom-ajax-loader.gif); background-size: 32px}
This is a workaround https://wordpress.org/plugins/cf7-better-ui/
Tiny plugin with modern loaders
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thank you for this function, however since a recent update it seems like it is not working anymore. Do you know what we need to change? :)