From ef888cf3c3f25719ec79ee912739471d76e34bca Mon Sep 17 00:00:00 2001 From: chris andersson Date: Fri, 3 May 2024 10:58:36 +0200 Subject: [PATCH] Rename wp-json to api (#436) * Rename wp-json to api * Update public/themes/wordplate/functions.php * Update public/themes/wordplate/functions.php --------- Co-authored-by: Vincent Klaiber --- public/themes/wordplate/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/themes/wordplate/functions.php b/public/themes/wordplate/functions.php index 77a8bc3..6856ff1 100644 --- a/public/themes/wordplate/functions.php +++ b/public/themes/wordplate/functions.php @@ -103,3 +103,6 @@ add_filter('wp_mail_from', fn() => env('MAIL_FROM_ADDRESS', 'hello@example.com')); add_filter('wp_mail_from_name', fn() => env('MAIL_FROM_NAME', 'Example')); + +// Rename /wp-json to /api. +add_filter('rest_url_prefix', fn() => 'api');