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/post-title.php

    r55246 r56065  
    2020        }
    2121
    22         $post_ID = $block->context['postId'];
    23         $title   = get_the_title();
     22        $post  = get_post( $block->context['postId'] );
     23        $title = get_the_title( $post );
    2424
    2525        if ( ! $title ) {
    … …  
    2929        $tag_name = 'h2';
    3030        if ( isset( $attributes['level'] ) ) {
    31                 $tag_name = 0 === $attributes['level'] ? 'p' : 'h' . $attributes['level'];
     31                $tag_name = 'h' . $attributes['level'];
    3232        }
    3333
    3434        if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
    3535                $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_ID ), esc_attr( $attributes['linkTarget'] ), $rel, $title );
     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 );
    3737        }
    3838
Note: See TracChangeset for help on using the changeset viewer.