Make WordPress Core


Ignore:
Timestamp:
01/29/2024 09:04:18 PM (4 months ago)
Author:
youknowriad
Message:

Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.

This patch, somewhat small brings a lot to WordPress.
This includes features like:

  • DataViews.
  • Customization tools like box shadow, background size and repeat.
  • UI improvements in the site editor.
  • Preferences sharing between the post and site editors.
  • Unified panels and editors between post and site editors.
  • Improved template mode in the post editor.
  • Iterations to multiple interactive blocks.
  • Preparing the blocks and UI for pattern overrides.
  • and a lot more.

Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.

File:
1 edited

Legend:

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

    r56710 r57377  
    3232
    3333add_filter( 'render_block_data', 'block_core_gallery_data_id_backcompatibility' );
     34
     35/**
     36 * Filter to randomize the order of image blocks.
     37 *
     38 * @param array $parsed_block The block being rendered.
     39 * @return array The block object with randomized order of image blocks.
     40 */
     41function block_core_gallery_random_order( $parsed_block ) {
     42    if ( 'core/gallery' === $parsed_block['blockName'] && ! empty( $parsed_block['attrs']['randomOrder'] ) ) {
     43        shuffle( $parsed_block['innerBlocks'] );
     44    }
     45    return $parsed_block;
     46}
     47
     48add_filter( 'render_block_data', 'block_core_gallery_random_order' );
    3449
    3550/**
Note: See TracChangeset for help on using the changeset viewer.