Make WordPress Core


Ignore:
Timestamp:
10/21/2025 07:11:53 AM (13 months ago)
Author:
ellatrix
Message:

Editor: update packages.

Updates the packages to match Gutenberg version 21.9.0 RC2.

Also updates the sync script to work with the new package-lock.json format.
Some reusable block tests were adjusted to work with more render arguments.
Added core-data to the ignore list for verify:source-maps because Yjs has been bundled by accident. To be removed in a follow-up. See https://core.trac.wordpress.org/ticket/64120. See ​https://github.com/WordPress/gutenberg/pull/72503.

See: ​https://github.com/WordPress/wordpress-develop/pull/10355.
See: https://core.trac.wordpress.org/ticket/64117.

Props ellatrix, dmsnell.
Fixes #64117.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/term-description.php

    r58187 r61009  
    1111 * @since 5.9.0
    1212 *
    13  * @param array $attributes Block attributes.
     13 * @param array    $attributes Block attributes.
     14 * @param string   $content    Block default content.
     15 * @param WP_Block $block      Block instance.
    1416 *
    1517 * @return string Returns the description of the current taxonomy term, if available
    1618 */
    17 function render_block_core_term_description( $attributes ) {
     19function render_block_core_term_description( $attributes, $content, $block ) {
    1820        $term_description = '';
    1921
    20         if ( is_category() || is_tag() || is_tax() ) {
     22        // Get term from context or from the current query.
     23        if ( isset( $block->context['termId'] ) && isset( $block->context['taxonomy'] ) ) {
     24                $term = get_term( $block->context['termId'], $block->context['taxonomy'] );
     25                if ( $term && ! is_wp_error( $term ) ) {
     26                        $term_description = $term->description;
     27                }
     28        } elseif ( is_category() || is_tag() || is_tax() ) {
    2129                $term_description = term_description();
    2230        }
Note: See TracChangeset for help on using the changeset viewer.