Make WordPress Core


Ignore:
Timestamp:
07/07/2023 07:18:46 AM (3 years ago)
Author:
isabel_brison
Message:

Editor: update npm packages with bug fixes and blessed tasks.

Includes miscellaneous bug fixes and enhancements to the Library task (#58579) and to the Command Palette task (#58643).

See #58745.

File:
1 edited

Legend:

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

    r56065 r56159  
    2020        }
    2121
    22         $post  = get_post( $block->context['postId'] );
    23         $title = get_the_title( $post );
     22        /**
     23         * The `$post` argument is intentionally omitted so that changes are reflected when previewing a post.
     24         * See: https://github.com/WordPress/gutenberg/pull/37622#issuecomment-1000932816.
     25         */
     26        $title = get_the_title();
    2427
    2528        if ( ! $title ) {
     
    3437        if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
    3538                $rel   = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : '';
    36                 $title = sprintf( '<a href="%1$s" target="%2$s" %3$s>%4$s</a>', get_the_permalink( $post ), esc_attr( $attributes['linkTarget'] ), $rel, $title );
     39                $title = sprintf( '<a href="%1$s" target="%2$s" %3$s>%4$s</a>', get_the_permalink( $block->context['postId'] ), esc_attr( $attributes['linkTarget'] ), $rel, $title );
    3740        }
    3841
Note: See TracChangeset for help on using the changeset viewer.