Make WordPress Core


Ignore:
Timestamp:
02/07/2023 07:01:56 AM (16 months ago)
Author:
youknowriad
Message:

Block Editor: Updated the WordPress packages to include Gutenberg 15.1.0 changes.

In addition to all the packages being updated to the latest versions,
this commit also includes some mandatory changes to avoid editor breakage:

  • Update React to to 18.2.0.
  • Add the right stylesheets to support iframed block editors.

Props ntsekouras, mamaduka, flixos90, desrosj, peterwilsoncc.
See #57471.

File:
1 edited

Legend:

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

    r53377 r55246  
    5656    }
    5757
    58     $query        = new WP_Query;
     58    $query        = new WP_Query();
    5959    $recent_posts = $query->query( $args );
    6060
     
    174174    remove_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 );
    175175
    176     $class = 'wp-block-latest-posts__list';
    177 
     176    $classes = array( 'wp-block-latest-posts__list' );
    178177    if ( isset( $attributes['postLayout'] ) && 'grid' === $attributes['postLayout'] ) {
    179         $class .= ' is-grid';
    180     }
    181 
     178        $classes[] = 'is-grid';
     179    }
    182180    if ( isset( $attributes['columns'] ) && 'grid' === $attributes['postLayout'] ) {
    183         $class .= ' columns-' . $attributes['columns'];
    184     }
    185 
     181        $classes[] = 'columns-' . $attributes['columns'];
     182    }
    186183    if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) {
    187         $class .= ' has-dates';
    188     }
    189 
     184        $classes[] = 'has-dates';
     185    }
    190186    if ( isset( $attributes['displayAuthor'] ) && $attributes['displayAuthor'] ) {
    191         $class .= ' has-author';
    192     }
    193 
    194     $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) );
     187        $classes[] = 'has-author';
     188    }
     189    if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
     190        $classes[] = 'has-link-color';
     191    }
     192
     193    $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
    195194
    196195    return sprintf(
Note: See TracChangeset for help on using the changeset viewer.