Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created February 11, 2020 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/fe7a6eaac737d990eea59fc11faa8335 to your computer and use it in GitHub Desktop.
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.
<?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