false, 'username_exists' => false); if ($email && email_exists($email)) { $resp['email_exists'] = true; } if ($username && username_exists($username)) { $resp['username_exists'] = true; } wp_send_json($resp); }); // Initialize the admin class only once after all plugin files are loaded. add_action( 'plugins_loaded', function() { if ( class_exists( 'ADALC_Admin' ) ) { new ADALC_Admin(); } });