Changeset 10256 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
- Timestamp:
- 09/14/2020 10:39:58 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r10218 r10256 612 612 $blocks[ $block_name ]->title = $trunk_readme->name; 613 613 } 614 } 615 616 // Filter the blocks list so that the parent block is first. 617 if ( count( $blocks ) > 1 ) { 618 $children = array_filter( 619 $blocks, 620 function( $block ) { 621 return isset( $block->parent ) && count( $block->parent ); 622 } 623 ); 624 625 $parent = array_filter( 626 $blocks, 627 function( $block ) { 628 return ! isset( $block->parent ) || ! count( $block->parent ); 629 } 630 ); 631 632 $blocks = array_merge( $parent, $children ); 614 633 } 615 634
Note: See TracChangeset
for help on using the changeset viewer.