From e832e6b07f016e3e97c0fbe47d2cf892705580ba Mon Sep 17 00:00:00 2001 From: Sal Ferrarello Date: Sun, 4 Dec 2016 12:33:51 -0500 Subject: [PATCH] Add notice when pretty permalinks are not being used See #32 --- rest-api-console.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/rest-api-console.php b/rest-api-console.php index 7173dfb..f1e84b9 100644 --- a/rest-api-console.php +++ b/rest-api-console.php @@ -41,8 +41,27 @@ public function maybe_render_iframe() { public function render_page() { $url = add_query_arg( 'iframe', 'yesplease' ); + + if ( ! get_option('permalink_structure') ) { + ?> +
+

Plain, which prevents the REST API from working. Please change to another permalink type on the Permalink Settings page.', 'rest-api-console' ), + admin_url( 'options-permalink.php' ) + ); ?> +

+
+ + + -