Skip to content

Commit

Permalink
Merge pull request #138 from a2hosting/a2opt-737
Browse files Browse the repository at this point in the history
Do not run email confirmation if easy hide login is active
  • Loading branch information
supersoju authored Feb 26, 2024
2 parents bff5b93 + 0163749 commit 8b5292a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions a2-optimized.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,25 @@ function run_a2_optimized() {

register_activation_hook( __FILE__, [ new A2_Optimized\App\Activator(), 'activate' ] );
register_deactivation_hook( __FILE__, [ new A2_Optimized\App\Deactivator(), 'deactivate' ] );

new A2_Optimized_Maintenance;

if (get_option('a2_cache_enabled') == 1) {
if(in_array('litespeed-cache/litespeed-cache.php', apply_filters('active_plugins', get_option('active_plugins')))){
if (in_array('litespeed-cache/litespeed-cache.php', apply_filters('active_plugins', get_option('active_plugins')))) {
A2_Optimized_Cache_Disk::clean();
update_option('a2_cache_enabled', 0);
} else {
add_action('plugins_loaded', [ 'A2_Optimized_Cache', 'init' ]);
}
}
if(is_admin()){
if (is_admin()) {
new A2_Optimized_SiteHealth;
if (defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT) {
add_action('admin_menu', ['A2_Optimized_Optimizations', 'addLockedEditor'], 100, 100);
}
if (in_array('easy-hide-login/wp-hide-login.php', apply_filters('active_plugins', get_option('active_plugins')))) {
add_filter( 'admin_email_check_interval', '__return_false' );
}
}
if (get_option('A2_Optimized_Plugin_recaptcha', 0) == 1 && !is_admin()) {
add_action('woocommerce_login_form', ['A2_Optimized_Optimizations', 'login_captcha']);
Expand All @@ -112,9 +115,9 @@ function run_a2_optimized() {
add_filter('preprocess_comment', ['A2_Optimized_Optimizations', 'captcha_comment_authenticate'], 1, 3);
}

if(file_exists('/opt/a2-optimized/wordpress/class.A2_Optimized_Private_Optimizations_v3.php')){
if (file_exists('/opt/a2-optimized/wordpress/class.A2_Optimized_Private_Optimizations_v3.php')) {
require_once('/opt/a2-optimized/wordpress/class.A2_Optimized_Private_Optimizations_v3.php');
new A2_Optimized_Private_Optimizations();
new A2_Optimized_Private_Optimizations();
}

new A2_Optimized_SiteData;
Expand All @@ -126,7 +129,6 @@ function run_a2_optimized() {
$optimizations->block_xmlrpc_request();
add_filter('xmlrpc_methods', ['A2_Optimized_Optimizations', 'remove_xmlrpc_methods']);
}

}

run_a2_optimized();

0 comments on commit 8b5292a

Please sign in to comment.