Make WordPress Core


Ignore:
Timestamp:
05/23/2024 07:37:08 PM (2 years 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-biography.php

    r53157 r58187  
    99 * Renders the `core/post-author-biography` block on the server.
    1010 *
     11 * @since 6.0.0
     12 *
    1113 * @param  array    $attributes Block attributes.
    1214 * @param  string   $content    Block default content.
    … …  
    1517 */
    1618function render_block_core_post_author_biography( $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 '';
    … …  
    3740/**
    3841 * Registers the `core/post-author-biography` block on the server.
     42 *
     43 * @since 6.0.0
    3944 */
    4045function register_block_core_post_author_biography() {
Note: See TracChangeset for help on using the changeset viewer.