0

Option to stop force login from installing on staging push


Avatar
Branden Tolle

i'd like a toggle to stop the automatic installation of the Force Login plugin that is currently installed when you push any site to staging.

the plugin having to constantly disable this plugin is very annoying, and has conflicts some times, which regularly cause me headaches.

A

Activity Newest / Oldest

N

boundless

We use a maintenance mode plugin instead of Force Login. Maintenance mode plugins also let you block access but they're more selective, so they often provide ways to intentionally bypass them without actually logging in.


Avatar

Branden Tolle

note to anyone else looking for this, you can just use a function:

//automatically disabled the Force Login Plugin
function deactivate_plugin_conditional() {
if ( is_plugin_active('wp-force-login/wp-force-login.php') ) {
deactivate_plugins('wp-force-login/wp-force-login.php');
}
}
add_action( 'init', 'deactivate_plugin_conditional' );