From dea44459da861541f643f970042ce1b8e7f96746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=83=C2=B3=C3=85=E2=80=9Akowski?= Date: Mon, 25 Apr 2022 16:14:46 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@53259 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-editor.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php index 48bf0dad3828d..f7aa838b9b8dd 100644 --- a/src/wp-includes/block-editor.php +++ b/src/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,