WordPress.org

Make WordPress Core

Ticket #41014: 41014.diff

File 41014.diff, 1.0 KB (added by aduth, 4 years ago)
  • src/wp-includes/option.php

    diff --git src/wp-includes/option.php src/wp-includes/option.php
    index 9f7cc8698e..bd2b27a6c0 100644
    function register_initial_settings() { 
    18531853                'description'  => __( 'Allow people to post comments on new articles.' ),
    18541854        ) );
    18551855
     1856        register_setting( 'permalink', 'permalink_structure', array(
     1857                'show_in_rest' => true,
     1858                'type'         => 'string',
     1859                'description'  => __( 'Custom URL structure for permalinks and archives.' ),
     1860        ) );
    18561861}
    18571862
    18581863/**
  • tests/phpunit/tests/rest-api/rest-settings-controller.php

    diff --git tests/phpunit/tests/rest-api/rest-settings-controller.php tests/phpunit/tests/rest-api/rest-settings-controller.php
    index 21704a035c..78441247af 100644
    class WP_Test_REST_Settings_Controller extends WP_Test_REST_Controller_Testcase 
    6565                        'posts_per_page',
    6666                        'default_ping_status',
    6767                        'default_comment_status',
     68                        'permalink_structure',
    6869                );
    6970
    7071                if ( ! is_multisite() ) {