Closed aatospaja closed 6 years ago
Actually I should have mentioned that one can remove the action manually in fuctions.php and then add the styles themselves when needed.
I've added a version check for CF7BS version 1.4.9+ to use a stylesheet instead of inline styles, for backwards compatibility. The only thing the inline styles will do is set the AJAX loader image, which you can disable by adding remove_action( 'wp_head', 'cf7bs_inline_styles' );
to your code if you use a custom loader. The new stylesheet will be loaded when the action wpcf7_enqueue_styles
is fired, so if you use conditional loading, it will work for CF7BS too.
@felixarntz still has to approve version 1.4.8, but probably will deploy both versions shortly.
Well done! :)
This plugin adds custom inline styles to the head section. (function cf7bs_inline_styles)
This unfortunately is loaded on every possible page as it is hooked on 'wp_head' -action. On the other hand, CF7 allows conditional loding of it's styles and scripts only when needed. ([https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/])
So a major improvement to this plugin would be to respect CF7 conditionals and only add the inline styles when actually needed. Also it would be amazing to be able to disable the inline styles altogether and manually add them to theme css.