From 2f4f619046cfc1e98dfc9fa492819bd626499abc Mon Sep 17 00:00:00 2001 From: wokamoto Date: Fri, 25 Apr 2025 12:55:36 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E7=92=B0?= =?UTF-8?q?=E5=A2=83=E3=81=A7=E3=82=82=20db.json=20=E3=81=8C=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-serverless-api.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/wp-serverless-api.php b/wp-serverless-api.php index 999754c..2f07564 100644 --- a/wp-serverless-api.php +++ b/wp-serverless-api.php @@ -4,7 +4,7 @@ Plugin Name: WP Serverless API Plugin URI: https://github.com/getshifter/wp-serverless-api Description: WordPress REST API to JSON File -Version: 0.2.0 +Version: 0.2.1 Author: Shifter Author URI: https://getshifter.io */ @@ -32,12 +32,7 @@ function compile_db( $db_array = array(); foreach ($routes as $route) { - if (getenv("SHIFTER_ACCESS_TOKEN") === false) { - $url = 'https://demo.wp-api.org/wp-json/wp/v2/' . $route; - } else { - $url = esc_url( home_url( '/' ) ) . 'wp-json/wp/v2/' . $route; - } - + $url = esc_url( home_url( '/' ) ) . 'wp-json/wp/v2/' . $route; $jsonData = json_decode( file_get_contents($url) ); $db_array[$route] = (array) $jsonData;