From 09dd371fc0b58d42dce3a57d6843e942975fd647 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Tue, 8 Jan 2019 02:50:05 +0000 Subject: [PATCH] REST API: Remove `permalink_structure` from the REST API settings endpoint. This was ultimately fixed in #45017, so is redunant. Reverts [42142,42359,42540]. See #41014. git-svn-id: https://develop.svn.wordpress.org/trunk@44446 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 10 ---------- .../tests/rest-api/rest-settings-controller.php | 1 - tests/qunit/fixtures/wp-api-generated.js | 8 +------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 8ae0b68595..f6e3eafcdf 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -2058,16 +2058,6 @@ function register_initial_settings() { 'description' => __( 'Allow people to post comments on new articles.' ), ) ); - - register_setting( - 'permalink', - 'permalink_structure', - array( - 'show_in_rest' => true, - 'type' => 'string', - 'description' => __( 'Custom URL structure for permalinks and archives.' ), - ) - ); } /** diff --git a/tests/phpunit/tests/rest-api/rest-settings-controller.php b/tests/phpunit/tests/rest-api/rest-settings-controller.php index d7b7a9aee9..73805b4d38 100644 --- a/tests/phpunit/tests/rest-api/rest-settings-controller.php +++ b/tests/phpunit/tests/rest-api/rest-settings-controller.php @@ -88,7 +88,6 @@ class WP_Test_REST_Settings_Controller extends WP_Test_REST_Controller_Testcase 'posts_per_page', 'default_ping_status', 'default_comment_status', - 'permalink_structure', ); if ( ! is_multisite() ) { diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index e2c8e8f5c7..7e18cb0104 100644 --- a/tests/qunit/fixtures/wp-api-generated.js +++ b/tests/qunit/fixtures/wp-api-generated.js @@ -4634,11 +4634,6 @@ mockedApiResponse.Schema = { ], "description": "Allow people to post comments on new articles.", "type": "string" - }, - "permalink_structure": { - "required": false, - "description": "Custom URL structure for permalinks and archives.", - "type": "string" } } } @@ -6074,6 +6069,5 @@ mockedApiResponse.settings = { "default_post_format": "0", "posts_per_page": 10, "default_ping_status": "open", - "default_comment_status": "open", - "permalink_structure": null + "default_comment_status": "open" };