Changeset 59775 for trunk/src/wp-includes/blocks/rss.php
- Timestamp:
- 02/07/2025 03:44:07 PM (12 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/rss.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/rss.php
r59330 r59775 62 62 if ( is_object( $author ) ) { 63 63 $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 } 69 71 } 70 72 } 71 73 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' ) ); 75 78 $excerpt = esc_attr( wp_trim_words( $excerpt, $attributes['excerptLength'], ' […]' ) ); 76 79
Note: See TracChangeset
for help on using the changeset viewer.