Make WordPress Core

Ticket #39854: 39854.patch

File 39854.patch, 666 bytes (added by sagarkbhatt, 7 years ago)

Added gmt_offset in default wp-json endpoint.

  • wp-includes/rest-api/class-wp-rest-server.php

    diff --git a/wp-includes/rest-api/class-wp-rest-server.php b/wp-includes/rest-api/class-wp-rest-server.php
    index 4f5ae76..49efdac 100644
    a b class WP_REST_Server { 
    10161016                        'description'    => get_option( 'blogdescription' ),
    10171017                        'url'            => get_option( 'siteurl' ),
    10181018                        'home'           => home_url(),
     1019                        'gmt_offset'     => get_option( 'gmt_offset' ),
    10191020                        'namespaces'     => array_keys( $this->namespaces ),
    10201021                        'authentication' => array(),
    10211022                        'routes'         => $this->get_data_for_routes( $this->get_routes(), $request['context'] ),