Skip to content

Commit

Permalink
Editor: Add default comment status to discussion settings
Browse files Browse the repository at this point in the history
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: WordPress/gutenberg#40484.

Props luisherranz.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53259 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
gziolo committed Apr 25, 2022
1 parent dbda79e commit dea4445
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/wp-includes/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dea4445

Please sign in to comment.