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. Built from https://develop.svn.wordpress.org/trunk@42359 git-svn-id: http://core.svn.wordpress.org/trunk@42188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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.' ),
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user