Created
February 11, 2020 16:54
-
-
Save joshfeck/fe7a6eaac737d990eea59fc11faa8335 to your computer and use it in GitHub Desktop.
Don't display Event Espresso Maintenance Mode notification if Beaver Builder editor is active. Event Espresso 4 + Beaver Builder. Add this code snippet into its own little WordPress plugin and activate it.
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 | |
add_action( | |
'shutdown', | |
function(){ | |
if( | |
class_exists('FLBuilderModel') | |
&& class_exists('EE_Maintenance_Mode') | |
&& FLBuilderModel::is_builder_active() | |
) { | |
remove_action( | |
'shutdown', | |
array( | |
EE_Maintenance_Mode::instance(), | |
'display_maintenance_mode_notice' | |
), | |
10 | |
); | |
} | |
}, | |
9 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment