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

    r55246 r58187  
    99 * Renders the `core/post-author-name` block on the server.
    1010 *
     11 * @since 6.2.0
     12 *
    1113 * @param  array    $attributes Block attributes.
    1214 * @param  string   $content    Block default content.
     
    1517 */
    1618function render_block_core_post_author_name( $attributes, $content, $block ) {
    17     if ( ! isset( $block->context['postId'] ) ) {
    18         return '';
     19    if ( isset( $block->context['postId'] ) ) {
     20        $author_id = get_post_field( 'post_author', $block->context['postId'] );
     21    } else {
     22        $author_id = get_query_var( 'author' );
    1923    }
    2024
    21     $author_id = get_post_field( 'post_author', $block->context['postId'] );
    2225    if ( empty( $author_id ) ) {
    2326        return '';
     
    4346/**
    4447 * Registers the `core/post-author-name` block on the server.
     48 *
     49 * @since 6.2.0
    4550 */
    4651function register_block_core_post_author_name() {
Note: See TracChangeset for help on using the changeset viewer.