diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 265b0bdbe0..f8f3180d5c 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -2020,6 +2020,11 @@ function register_initial_settings() { ) ); + 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 1be304dd92..dcf2d57af3 100644 --- a/tests/phpunit/tests/rest-api/rest-settings-controller.php +++ b/tests/phpunit/tests/rest-api/rest-settings-controller.php @@ -72,6 +72,7 @@ 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() ) {