Make WordPress Core


Ignore:
Timestamp:
04/25/2022 04:14:46 PM (5 years ago)
Author:
gziolo
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-editor.php

    r53208 r53259  
    472472        $editor_settings['localAutosaveInterval']            = 15;
    473473        $editor_settings['__experimentalDiscussionSettings'] = array(
    474                 'commentOrder'        => get_option( 'comment_order' ),
    475                 'commentsPerPage'     => get_option( 'comments_per_page' ),
    476                 'defaultCommentsPage' => get_option( 'default_comments_page' ),
    477                 'pageComments'        => get_option( 'page_comments' ),
    478                 'threadComments'      => get_option( 'thread_comments' ),
    479                 'threadCommentsDepth' => get_option( 'thread_comments_depth' ),
    480                 'avatarURL'           => get_avatar_url(
     474                'commentOrder'         => get_option( 'comment_order' ),
     475                'commentsPerPage'      => get_option( 'comments_per_page' ),
     476                'defaultCommentsPage'  => get_option( 'default_comments_page' ),
     477                'pageComments'         => get_option( 'page_comments' ),
     478                'threadComments'       => get_option( 'thread_comments' ),
     479                'threadCommentsDepth'  => get_option( 'thread_comments_depth' ),
     480                'defaultCommentStatus' => get_option( 'default_comment_status' ),
     481                'avatarURL'            => get_avatar_url(
    481482                        '',
    482483                        array(
Note: See TracChangeset for help on using the changeset viewer.