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
This commit is contained in:
gziolo 2022-04-25 16:16:10 +00:00
parent f7dde1e53a
commit 287662fca1
2 changed files with 9 additions and 8 deletions

View File

@ -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,

View File

@ -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.