Created
May 11, 2018 17:48
-
-
Save joshfeck/fa4bd6b11bccbc74e75b6cb02bd023dc to your computer and use it in GitHub Desktop.
Ensure Event Espresso modal html gets injected at the correct location. Useful for sites with Beaver Builder.
This file contains 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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function move_ee_notices_to_main_loop() { | |
add_filter('FHEE__EE_Front_Controller__display_errors', '__return_true'); | |
return false; | |
} | |
function remove_ee_notices_from_early_loop() { | |
if(!did_action('wp_head')) { | |
add_filter( | |
'FHEE__EE_Front_Controller__display_errors', | |
'move_ee_notices_to_main_loop' | |
); | |
} | |
} | |
add_action('loop_start', 'remove_ee_notices_from_early_loop', 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment