Make WordPress Core


Ignore:
Timestamp:
10/26/2016 10:19:08 PM (9 years ago)
Author:
rachelbaker
Message:

REST API: Add the default_comment_status and default_ping_status options to the setting endpoint.

Props joehoyle.
See #38490.

File:
1 edited

Legend:

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

    r38916 r38971  
    18201820        'default'      => 10,
    18211821    ) );
     1822
     1823    register_setting( 'discussion', 'default_ping_status', array(
     1824        'show_in_rest' => array(
     1825            'schema'   => array(
     1826                'enum' => array( 'open', 'closed' ),
     1827            ),
     1828        ),
     1829        'type'         => 'string',
     1830        'description'  => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.' ),
     1831    ) );
     1832
     1833    register_setting( 'discussion', 'default_comment_status', array(
     1834        'show_in_rest' => array(
     1835            'schema'   => array(
     1836                'enum' => array( 'open', 'closed' ),
     1837            ),
     1838        ),
     1839        'type'         => 'string',
     1840        'description'  => __( 'Allow people to post comments on new articles.' ),
     1841    ) );
     1842
    18221843}
    18231844
Note: See TracChangeset for help on using the changeset viewer.