From 21e0f964e37cbc9d2a75a9ff95ce2a9857be5ed6 Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Wed, 26 Oct 2016 22:21:01 +0000 Subject: [PATCH] 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 --- wp-includes/option.php | 21 +++++++++++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index abc7b6f91d..866cbcc480 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -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.' ), + ) ); + } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index cec45083bb..7688fcd6a1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.