--- a/wp/wp-includes/blocks/term-description.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/blocks/term-description.php Fri Sep 05 18:40:08 2025 +0200
@@ -8,6 +8,8 @@
/**
* Renders the `core/term-description` block on the server.
*
+ * @since 5.9.0
+ *
* @param array $attributes Block attributes.
*
* @return string Returns the description of the current taxonomy term, if available
@@ -23,16 +25,22 @@
return '';
}
- $extra_attributes = ( isset( $attributes['textAlign'] ) )
- ? array( 'class' => 'has-text-align-' . $attributes['textAlign'] )
- : array();
- $wrapper_attributes = get_block_wrapper_attributes( $extra_attributes );
+ $classes = array();
+ if ( isset( $attributes['textAlign'] ) ) {
+ $classes[] = 'has-text-align-' . $attributes['textAlign'];
+ }
+ if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
+ $classes[] = 'has-link-color';
+ }
+ $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
return '<div ' . $wrapper_attributes . '>' . $term_description . '</div>';
}
/**
* Registers the `core/term-description` block on the server.
+ *
+ * @since 5.9.0
*/
function register_block_core_term_description() {
register_block_type_from_metadata(