Make WordPress Core


Ignore:
Timestamp:
06/27/2023 02:20:18 PM (3 years ago)
Author:
Bernhard Reiter
Message:

Editor: update Wordpress npm packages.

Updates the wordpress npm packages and their dependencies to the latest versions, as well as auto-updates to relevant core PHP files.

Props youknowriad, joemcgill, spacedmonkey, ramonopoly, peterwilsoncc, bernhard-reiter, tyxla, dmsnell.
Fixes #58623.

File:
1 edited

Legend:

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

    r55246 r56065  
    4848    $block_core_latest_posts_excerpt_length = $attributes['excerptLength'];
    4949    add_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 );
     50
     51    $filter_latest_posts_excerpt_more = static function( $more ) use ( $attributes ) {
     52        $use_excerpt = 'excerpt' === $attributes['displayPostContentRadio'];
     53        /* translators: %1$s is a URL to a post, excerpt truncation character, default … */
     54        return $use_excerpt ? sprintf( __( ' … <a href="%1$s" rel="noopener noreferrer">Read more</a>', 'gutenberg' ), esc_url( get_permalink() ) ) : $more;
     55    };
     56
     57    add_filter( 'excerpt_more', $filter_latest_posts_excerpt_more );
    5058
    5159    if ( isset( $attributes['categories'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.