From 287662fca125fc1547adb7678d1a36d812d4ea22 Mon Sep 17 00:00:00 2001 From: gziolo Date: Mon, 25 Apr 2022 16:16:10 +0000 Subject: [PATCH] Editor: Add default comment status to discussion settings This is a backport that exposes the default_comments_status option in the Editor, under the discussion settings, which then is then used by the Post Comments and Post Comments Form blocks. Related change in Gutenberg: https://github.com/WordPress/gutenberg/pull/40484. Props luisherranz. See #55567. Built from https://develop.svn.wordpress.org/trunk@53259 git-svn-id: http://core.svn.wordpress.org/trunk@52848 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-editor.php | 15 ++++++++------- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/wp-includes/block-editor.php b/wp-includes/block-editor.php index 48bf0dad38..f7aa838b9b 100644 --- a/wp-includes/block-editor.php +++ b/wp-includes/block-editor.php @@ -471,13 +471,14 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex $editor_settings['__unstableResolvedAssets'] = _wp_get_iframed_editor_assets(); $editor_settings['localAutosaveInterval'] = 15; $editor_settings['__experimentalDiscussionSettings'] = array( - 'commentOrder' => get_option( 'comment_order' ), - 'commentsPerPage' => get_option( 'comments_per_page' ), - 'defaultCommentsPage' => get_option( 'default_comments_page' ), - 'pageComments' => get_option( 'page_comments' ), - 'threadComments' => get_option( 'thread_comments' ), - 'threadCommentsDepth' => get_option( 'thread_comments_depth' ), - 'avatarURL' => get_avatar_url( + 'commentOrder' => get_option( 'comment_order' ), + 'commentsPerPage' => get_option( 'comments_per_page' ), + 'defaultCommentsPage' => get_option( 'default_comments_page' ), + 'pageComments' => get_option( 'page_comments' ), + 'threadComments' => get_option( 'thread_comments' ), + 'threadCommentsDepth' => get_option( 'thread_comments_depth' ), + 'defaultCommentStatus' => get_option( 'default_comment_status' ), + 'avatarURL' => get_avatar_url( '', array( 'size' => 96, diff --git a/wp-includes/version.php b/wp-includes/version.php index 0597808097..b3e0f2a7ff 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta2-53258'; +$wp_version = '6.0-beta2-53259'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.