Make WordPress Core


Ignore:
Timestamp:
02/07/2023 07:01:56 AM (16 months ago)
Author:
youknowriad
Message:

Block Editor: Updated the WordPress packages to include Gutenberg 15.1.0 changes.

In addition to all the packages being updated to the latest versions,
this commit also includes some mandatory changes to avoid editor breakage:

  • Update React to to 18.2.0.
  • Add the right stylesheets to support iframed block editors.

Props ntsekouras, mamaduka, flixos90, desrosj, peterwilsoncc.
See #57471.

File:
1 edited

Legend:

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

    r53157 r55246  
    2020
    2121    $post_ID            = $block->context['postId'];
     22    $post_title         = get_the_title( $post_ID );
     23    $screen_reader_text = sprintf(
     24        /* translators: %s is either the post title or post ID to describe the link for screen readers. */
     25        __( ': %s' ),
     26        '' !== $post_title ? $post_title : __( 'untitled post ' ) . $post_ID
     27    );
    2228    $justify_class_name = empty( $attributes['justifyContent'] ) ? '' : "is-justified-{$attributes['justifyContent']}";
    2329    $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $justify_class_name ) );
    2430    $more_text          = ! empty( $attributes['content'] ) ? wp_kses_post( $attributes['content'] ) : __( 'Read more' );
    2531    return sprintf(
    26         '<a %1s href="%2s" target="%3s">%4s</a>',
     32        '<a %1s href="%2s" target="%3s">%4s<span class="screen-reader-text">%5s</span></a>',
    2733        $wrapper_attributes,
    2834        get_the_permalink( $post_ID ),
    2935        esc_attr( $attributes['linkTarget'] ),
    30         $more_text
     36        $more_text,
     37        $screen_reader_text
    3138    );
    3239}
Note: See TracChangeset for help on using the changeset viewer.