commit 179da8d2b2fdaf55dfda8b218f2c731abb7c6511 Author: Remo Zaros Date: Thu May 7 16:35:15 2026 +0200 initial commit! diff --git a/assets/index.php b/assets/index.php new file mode 100644 index 0000000..0183dc4 --- /dev/null +++ b/assets/index.php @@ -0,0 +1,3 @@ + + + + + + +
+ + + + + +
+ get_headers(); + $params = $data->get_params(); + $nonce = $headers["x_wp_nonce"][0]; + + if (wp_verify_nonce($nonce, "wp_rest")) { + echo $nonce; + } +} + +function register_modal_api() +{ + register_rest_route("postcode-modal/v1", "submit", [ + "methods" => "POST", + "callback" => "handle_postcode_modal", + ]); +}