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

Props joehoyle.
See #38490.
Built from https://develop.svn.wordpress.org/trunk@38971


git-svn-id: http://core.svn.wordpress.org/trunk@38914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Rachel Baker 2016-10-26 22:21:01 +00:00
parent 95720f3b7c
commit 21e0f964e3
2 changed files with 22 additions and 1 deletions

View File

@ -1819,6 +1819,27 @@ function register_initial_settings() {
'description' => __( 'Blog pages show at most.' ),
'default' => 10,
) );
register_setting( 'discussion', 'default_ping_status', array(
'show_in_rest' => array(
'schema' => array(
'enum' => array( 'open', 'closed' ),
),
),
'type' => 'string',
'description' => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.' ),
) );
register_setting( 'discussion', 'default_comment_status', array(
'show_in_rest' => array(
'schema' => array(
'enum' => array( 'open', 'closed' ),
),
),
'type' => 'string',
'description' => __( 'Allow people to post comments on new articles.' ),
) );
}
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38970';
$wp_version = '4.7-alpha-38971';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.