Make WordPress Core


Ignore:
Timestamp:
04/12/2022 03:10:30 PM (2 years ago)
Author:
gziolo
Message:

Editor: Update WordPress packages based based on Gutenberg v13.0 RC3

This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included:

  • Avatar
  • Comment Author Name
  • Comment Content
  • Comment Date
  • Comment Edit Link
  • Comment Rely Link
  • Comment Template
  • Comments Pagination
  • Comments Pagination Next
  • Comments Pagination Previous
  • Comments Query Loop
  • Home Link
  • Post Author Biography
  • Query No Results
  • Read More

See more details in https://github.com/WordPress/wordpress-develop/pull/2564.

Props zieladam, ramonopoly, ocean90.
Fixes #55505.

File:
1 edited

Legend:

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

    r49226 r53157  
    1414 */
    1515function render_block_core_rss( $attributes ) {
     16    if ( in_array( untrailingslashit( $attributes['feedURL'] ), array( site_url(), home_url() ), true ) ) {
     17        return '<div class="components-placeholder"><div class="notice notice-error">' . __( 'Adding an RSS feed to this site’s homepage is not supported, as it could lead to a loop that slows down your site. Try using another block, like the <strong>Latest Posts</strong> block, to list posts from the site.' ) . '</div></div>';
     18    }
     19
    1620    $rss = fetch_feed( $attributes['feedURL'] );
    1721
     
    8488        $classnames[] = 'is-grid';
    8589    }
    86 
    8790    if ( isset( $attributes['columns'] ) && 'grid' === $attributes['blockLayout'] ) {
    8891        $classnames[] = 'columns-' . $attributes['columns'];
    8992    }
     93    if ( $attributes['displayDate'] ) {
     94        $classnames[] = 'has-dates';
     95    }
     96    if ( $attributes['displayAuthor'] ) {
     97        $classnames[] = 'has-authors';
     98    }
     99    if ( $attributes['displayExcerpt'] ) {
     100        $classnames[] = 'has-excerpts';
     101    }
     102
    90103    $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) );
    91104
Note: See TracChangeset for help on using the changeset viewer.