From eeb4f6156d15f3b41a122535a5720cf105733aa3 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 29 Jun 2024 15:44:33 +0000 Subject: [PATCH] Add simple-status.php --- simple-status.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 simple-status.php diff --git a/simple-status.php b/simple-status.php new file mode 100644 index 0000000..f3abc6d --- /dev/null +++ b/simple-status.php @@ -0,0 +1,22 @@ + 'ok'); + wp_send_json($status); +} + +// Register the custom endpoint +add_action('rest_api_init', function () { + register_rest_route('simple/v1', '/status', array( + 'methods' => 'GET', + 'callback' => 'simple_status_endpoint', + )); +}); +?>