Make WordPress Core


Ignore:
Timestamp:
06/26/2020 01:31:11 PM (6 years ago)
Author:
ellatrix
Message:

Editor: update JavaScript packages

Also update default block categories

Props youknowriad, gziolo, aduth.
Fixes #50420, #50278.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/latest-comments.php

    r46642 r48177  
    153153 */
    154154function register_block_core_latest_comments() {
    155         register_block_type(
    156                 'core/latest-comments',
     155        register_block_type_from_metadata(
     156                __DIR__ . '/latest-comments',
    157157                array(
    158                         'attributes'      => array(
    159                                 'align'          => array(
    160                                         'type' => 'string',
    161                                         'enum' => array(
    162                                                 'left',
    163                                                 'center',
    164                                                 'right',
    165                                                 'wide',
    166                                                 'full',
    167                                         ),
    168                                 ),
    169                                 'className'      => array(
    170                                         'type' => 'string',
    171                                 ),
    172                                 'commentsToShow' => array(
    173                                         'type'    => 'number',
    174                                         'default' => 5,
    175                                         'minimum' => 1,
    176                                         'maximum' => 100,
    177                                 ),
    178                                 'displayAvatar'  => array(
    179                                         'type'    => 'boolean',
    180                                         'default' => true,
    181                                 ),
    182                                 'displayDate'    => array(
    183                                         'type'    => 'boolean',
    184                                         'default' => true,
    185                                 ),
    186                                 'displayExcerpt' => array(
    187                                         'type'    => 'boolean',
    188                                         'default' => true,
    189                                 ),
    190                         ),
    191158                        'render_callback' => 'render_block_core_latest_comments',
    192159                )
Note: See TracChangeset for help on using the changeset viewer.