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:
parent
95720f3b7c
commit
21e0f964e3
|
@ -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.' ),
|
||||
) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue