Customizing Maintenance Mode
-
On the plugin ver. 3.7.7 you changed the function site_lockout_tasks() to static in AIOWPSecurity_WP_Loaded_Tasks which we used to subclass in our client themes in order to fully customize maintenance mode. This of course felt like a hack but there was no other apparent way going about it.
Is it possible to add custom maintenance support?
One way going about it could be by checking in the Theme directory for a specific php file such as maintenance.php or wp-security-visitor-lockout-page.php (as a drop in) before loading the default so that we can override and/or fully customize maintenance mode (see also WP_Maintenance_Mode plugin) like so:
$template = AIO_WP_SECURITY_PATH.'/other-includes/wp-security-visitor-lockout-page.php';
if( file_exists( trailingslashit( get_template_directory() ) . 'maintenance.php' ) )
{
$template = trailingslashit( get_template_directory() ) . 'maintenance.php';
}
if( is_child_theme() && file_exists( trailingslashit( get_stylesheet_directory()) . 'maintenance.php' ) )
{
$template = trailingslashit( get_stylesheet_directory() ) . 'maintenance.php';
}
include_once( $template );
We would be more than willing to help out!Thank you in advance for looking into this!
https://ww.wp.xz.cn/plugins/all-in-one-wp-security-and-firewall/
The topic ‘Customizing Maintenance Mode’ is closed to new replies.