'Thanks!')); } if (!$n || !$e || !$m) { wp_send_json_error(array('msg' => 'Please fill in all fields.')); } $s = wp_mail('hello@sami-ahmed.net', "Contact from $n via sami-ahmed.net", "Name: $n Email: $e $m", array('Reply-To: $e')); wp_send_json_success(array('msg' => $s ? 'Message sent!' : 'Mail failed.')); } // Fully disable Elementor global header/footer for this theme add_action('init', function() { if (defined('ELEMENTOR_VERSION')) { remove_action('get_header', 'elementor_get_header', 20); remove_action('get_footer', 'elementor_get_footer', 20); } }, 100); // Remove Elementor theme location hooks add_action('wp_head', function() { remove_action('wp_head', 'elementor_theme_do_location', 0); }, 1);