Make WordPress Core


Ignore:
Timestamp:
11/10/2017 06:10:23 AM (9 years ago)
Author:
pento
Message:

REST API: Add permalink_structure to the index endpoint.

This allows Gutenberg to implement permalink editing.

Props schlessera.
Fixes #42465.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r41223 r42142  
    10181018                // General site data.
    10191019                $available = array(
    1020                         'name'            => get_option( 'blogname' ),
    1021                         'description'     => get_option( 'blogdescription' ),
    1022                         'url'             => get_option( 'siteurl' ),
    1023                         'home'            => home_url(),
    1024                         'gmt_offset'      => get_option( 'gmt_offset' ),
    1025                         'timezone_string' => get_option( 'timezone_string' ),
    1026                         'namespaces'      => array_keys( $this->namespaces ),
    1027                         'authentication'  => array(),
    1028                         'routes'          => $this->get_data_for_routes( $this->get_routes(), $request['context'] ),
     1020                        'name'                => get_option( 'blogname' ),
     1021                        'description'         => get_option( 'blogdescription' ),
     1022                        'url'                 => get_option( 'siteurl' ),
     1023                        'home'                => home_url(),
     1024                        'gmt_offset'          => get_option( 'gmt_offset' ),
     1025                        'timezone_string'     => get_option( 'timezone_string' ),
     1026                        'permalink_structure' => get_option( 'permalink_structure' ),
     1027                        'namespaces'          => array_keys( $this->namespaces ),
     1028                        'authentication'      => array(),
     1029                        'routes'              => $this->get_data_for_routes( $this->get_routes(), $request['context'] ),
    10291030                );
    10301031
Note: See TracChangeset for help on using the changeset viewer.