Make WordPress Core


Ignore:
Timestamp:
05/23/2024 07:37:08 PM (19 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/site-tagline.php

    r51199 r58187  
    99 * Renders the `core/site-tagline` block on the server.
    1010 *
     11 * @since 5.8.0
     12 *
    1113 * @param array $attributes The block attributes.
    1214 *
     
    1820        return;
    1921    }
     22
     23    $tag_name           = 'p';
    2024    $align_class_name   = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
    2125    $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
    2226
     27    if ( isset( $attributes['level'] ) && 0 !== $attributes['level'] ) {
     28        $tag_name = 'h' . (int) $attributes['level'];
     29    }
     30
    2331    return sprintf(
    24         '<p %1$s>%2$s</p>',
     32        '<%1$s %2$s>%3$s</%1$s>',
     33        $tag_name,
    2534        $wrapper_attributes,
    2635        $site_tagline
     
    3039/**
    3140 * Registers the `core/site-tagline` block on the server.
     41 *
     42 * @since 5.8.0
    3243 */
    3344function register_block_core_site_tagline() {
     
    3950    );
    4051}
     52
    4153add_action( 'init', 'register_block_core_site_tagline' );
Note: See TracChangeset for help on using the changeset viewer.