Make WordPress Core


Ignore:
Timestamp:
02/07/2025 03:44:07 PM (12 months ago)
Author:
joemcgill
Message:

Editor: Update packages for 6.8 pre-Betas.

Syncs @wordpress/* packages to the 'latest' npm tag.

Props mamaduka, joemcgill, youknowriad, swissspidy, sergiomdgomes, gziolo.
See #62887.

File:
1 edited

Legend:

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

    r59330 r59775  
    6262            if ( is_object( $author ) ) {
    6363                $author = $author->get_name();
    64                 $author = '<span class="wp-block-rss__item-author">' . sprintf(
    65                     /* translators: byline. %s: author. */
    66                     __( 'by %s' ),
    67                     esc_html( strip_tags( $author ) )
    68                 ) . '</span>';
     64                if ( ! empty( $author ) ) {
     65                    $author = '<span class="wp-block-rss__item-author">' . sprintf(
     66                        /* translators: byline. %s: author. */
     67                        __( 'by %s' ),
     68                        esc_html( strip_tags( $author ) )
     69                    ) . '</span>';
     70                }
    6971            }
    7072        }
    7173
    72         $excerpt = '';
    73         if ( $attributes['displayExcerpt'] ) {
    74             $excerpt = html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
     74        $excerpt     = '';
     75        $description = $item->get_description();
     76        if ( $attributes['displayExcerpt'] && ! empty( $description ) ) {
     77            $excerpt = html_entity_decode( $description, ENT_QUOTES, get_option( 'blog_charset' ) );
    7578            $excerpt = esc_attr( wp_trim_words( $excerpt, $attributes['excerptLength'], ' [&hellip;]' ) );
    7679
Note: See TracChangeset for help on using the changeset viewer.