WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/03/2017 10:28:33 PM (2 years ago)
Author:
joehoyle
Message:

REST API: Include permalink_structure in the settings route.

There are situations where the REST API client wants to be able to read and set the permalink_structure option. Though this doesn’t fix the use case of front-end rendered unauthenticated websites, it still has utility as a setting in it’s own right.

Props aduth.
See #41014.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r42343 r42359  
    20212021    );
    20222022
     2023    register_setting( 'permalink', 'permalink_structure', array(
     2024        'show_in_rest' => true,
     2025        'type'         => 'string',
     2026        'description'  => __( 'Custom URL structure for permalinks and archives.' ),
     2027    ) );
    20232028}
    20242029
Note: See TracChangeset for help on using the changeset viewer.