Make WordPress Core


Ignore:
Timestamp:
05/23/2024 07:37:08 PM (9 months ago)
Author:
ellatrix
Message:

Editor: Update npm packages.

Updates the editor npm packages to latest versions.

See https://github.com/WordPress/wordpress-develop/pull/6612.

Props ellatrix, mukesh27, youknowriad, mamaduka.

File:
1 edited

Legend:

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

    r56816 r58187  
    1818 * Callback for the excerpt_length filter used by
    1919 * the Latest Posts block at render time.
     20 *
     21 * @since 5.4.0
    2022 *
    2123 * @return int Returns the global $block_core_latest_posts_excerpt_length variable
     
    2931/**
    3032 * Renders the `core/latest-posts` block on server.
     33 *
     34 * @since 5.0.0
    3135 *
    3236 * @param array $attributes The block attributes.
     
    149153             */
    150154            if ( str_ends_with( $trimmed_excerpt, ' […]' ) ) {
     155                /** This filter is documented in wp-includes/formatting.php */
    151156                $excerpt_length = (int) apply_filters( 'excerpt_length', $block_core_latest_posts_excerpt_length );
    152157                if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) {
     
    154159                    $trimmed_excerpt .= sprintf(
    155160                        /* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */
    156                         __( '… <a href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
     161                        __( '… <a class="wp-block-latest-posts__read-more" href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
    157162                        esc_url( $post_link ),
    158163                        esc_html( $title )
     
    219224/**
    220225 * Registers the `core/latest-posts` block on server.
     226 *
     227 * @since 5.0.0
    221228 */
    222229function register_block_core_latest_posts() {
     
    241248 * TODO: Remove when and if the bottom client-side deprecation for this block
    242249 * is removed.
     250 *
     251 * @since 5.5.0
    243252 *
    244253 * @param array $block A single parsed block object.
Note: See TracChangeset for help on using the changeset viewer.