mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
REST API: Include permalink_template/generated_slug for Posts
In order for clients to present permalink previews, the REST API must share the computed results of get_sample_permalink(). These two values are now exposed as permalink_template and generated_slug for public, viewable post types, but only for context=edit. Merges [43720] to trunk. Props danielbachhuber, rahulsprajapati. Fixes #45017. git-svn-id: https://develop.svn.wordpress.org/trunk@43980 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -40,7 +40,7 @@ abstract class WP_Test_REST_Controller_Testcase extends WP_Test_REST_TestCase {
|
||||
abstract public function test_get_item_schema();
|
||||
|
||||
public function filter_rest_url_for_leading_slash( $url, $path ) {
|
||||
if ( is_multisite() ) {
|
||||
if ( is_multisite() || get_option( 'permalink_structure' ) ) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user