We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f96b884 + 2f4f619 commit 1a4d8ccCopy full SHA for 1a4d8cc
wp-serverless-api.php
@@ -4,7 +4,7 @@
4
Plugin Name: WP Serverless API
5
Plugin URI: https://github.com/getshifter/wp-serverless-api
6
Description: WordPress REST API to JSON File
7
-Version: 0.2.0
+Version: 0.2.1
8
Author: Shifter
9
Author URI: https://getshifter.io
10
*/
@@ -32,12 +32,7 @@ function compile_db(
32
$db_array = array();
33
34
foreach ($routes as $route) {
35
- if (getenv("SHIFTER_ACCESS_TOKEN") === false) {
36
- $url = 'https://demo.wp-api.org/wp-json/wp/v2/' . $route;
37
- } else {
38
- $url = esc_url( home_url( '/' ) ) . 'wp-json/wp/v2/' . $route;
39
- }
40
-
+ $url = esc_url( home_url( '/' ) ) . 'wp-json/wp/v2/' . $route;
41
$jsonData = json_decode( file_get_contents($url) );
42
43
$db_array[$route] = (array) $jsonData;
0 commit comments