Make WordPress Core


Ignore:
Timestamp:
04/11/2022 03:20:13 PM (3 years ago)
Author:
gziolo
Message:

Editor: Add changes for new Comments Query Loop blocks

Backports changes from Gutenberg to add functions required by Comment Query Loop and related blocks. Related unit tests depends on the new blocks and they will get added seperately.

Props darerodz, timothyblynjacobs.
See #55505.

File:
1 edited

Legend:

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

    r53090 r53138  
    396396
    397397    $editor_settings['localAutosaveInterval'] = 15;
     398
     399    $editor_settings['__experimentalDiscussionSettings'] = array(
     400        'commentOrder'        => get_option( 'comment_order' ),
     401        'commentsPerPage'     => get_option( 'comments_per_page' ),
     402        'defaultCommentsPage' => get_option( 'default_comments_page' ),
     403        'pageComments'        => get_option( 'page_comments' ),
     404        'threadComments'      => get_option( 'thread_comments' ),
     405        'threadCommentsDepth' => get_option( 'thread_comments_depth' ),
     406        'avatarURL'           => get_avatar_url(
     407            '',
     408            array(
     409                'size'          => 96,
     410                'force_default' => true,
     411                'default'       => get_option( 'avatar_default' ),
     412            )
     413        ),
     414    );
    398415
    399416    /**
Note: See TracChangeset for help on using the changeset viewer.