PATH:
home
/
infinityocean
/
public_html
/
wp-includes
/
blocks
<?php /** * Server-side rendering of the `core/term-description` block. * * @package WordPress */ /** * Renders the `core/term-description` block on the server. * * @since 5.9.0 * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. * * @return string Returns the description of the current taxonomy term, if available */ function render_block_core_term_description( $attributes, $content, $block ) { $term_description = ''; // Get term from context or from the current query. if ( isset( $block->context['termId'] ) && isset( $block->context['taxonomy'] ) ) { $term = get_term( $block->context['termId'], $block->context['taxonomy'] ); if ( $term && ! is_wp_error( $term ) ) { $term_description = $term->description; } } elseif ( is_category() || is_tag() || is_tax() ) { $term_description = term_description(); } if ( empty( $term_description ) ) { return ''; } $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( __DIR__ . '/term-description', array( 'render_callback' => 'render_block_core_term_description', ) ); } add_action( 'init', 'register_block_core_term_description' );
[+]
..
[+]
social-link
[+]
button
[+]
query-pagination-previous
[+]
media-text
[+]
term-name
[-] post-featured-image.php
[edit]
[+]
comments-title
[-] rss.php
[edit]
[+]
buttons
[-] accordion-item.php
[edit]
[-] post-date.php
[edit]
[+]
site-logo
[+]
pullquote
[+]
comment-date
[-] widget-group.php
[edit]
[+]
table
[+]
categories
[-] index.php
[edit]
[+]
video
[+]
widget-group
[+]
accordion-item
[+]
social-links
[-] comments-pagination-next.php
[edit]
[+]
rss
[-] navigation-link.php
[edit]
[-] cover.php
[edit]
[+]
pattern
[+]
site-title
[-] error_log
[edit]
[+]
quote
[-] template-part.php
[edit]
[-] post-title.php
[edit]
[+]
navigation
[+]
comments-pagination-numbers
[+]
html
[+]
comment-reply-link
[+]
home-link
[+]
avatar
[+]
cover
[-] post-author-biography.php
[edit]
[+]
list-item
[-] comment-content.php
[edit]
[+]
post-comments-form
[+]
query-pagination-next
[+]
navigation-submenu
[+]
shortcode
[-] image.php
[edit]
[+]
code
[+]
loginout
[+]
paragraph
[+]
legacy-widget
[+]
missing
[-] query-pagination.php
[edit]
[+]
site-tagline
[+]
details
[+]
post-terms
[-] navigation.php
[edit]
[+]
spacer
[+]
comment-template
[+]
comment-edit-link
[+]
columns
[+]
separator
[+]
comments
[+]
query-title
[+]
nextpage
[+]
query-no-results
[-] comment-edit-link.php
[edit]
[+]
group
[+]
preformatted
[+]
post-author
[+]
comments-pagination-previous
[-] calendar.php
[edit]
[+]
query-pagination
[+]
footnotes
[-] term-description.php
[edit]
[+]
post-author-name
[+]
read-more
[+]
archives
[+]
verse
[+]
calendar
[-] comments-pagination-numbers.php
[edit]
[+]
embed
[-] post-template.php
[edit]
[+]
comment-content
[+]
post-comments-link
[+]
heading
[-] page-list.php
[edit]
[-] post-comments-form.php
[edit]
[+]
post-comments-count
[+]
latest-comments
[+]
list
[+]
post-template
[+]
post-title
[+]
more
[+]
post-excerpt
[+]
page-list-item
[+]
column
[+]
math
[+]
file
[+]
latest-posts
[+]
post-time-to-read
[+]
query
[-] navigation-submenu.php
[edit]
[+]
term-description
[+]
term-template
[+]
comments-pagination
[-] pattern.php
[edit]
[-] accordion.php
[edit]
[+]
accordion-panel
[-] loginout.php
[edit]
[+]
gallery
[+]
page-list
[-] post-author.php
[edit]
[+]
query-total
[+]
tag-cloud
[+]
term-count
[+]
post-content
[-] tag-cloud.php
[edit]
[+]
search
[+]
template-part
[-] comment-date.php
[edit]
[+]
audio
[+]
text-columns
[+]
comments-pagination-next
[-] footnotes.php
[edit]
[+]
post-navigation-link
[+]
image
[+]
post-date
[+]
freeform
[+]
accordion-heading
[+]
block
[+]
post-author-biography
[+]
comment-author-name
[+]
post-featured-image
[+]
accordion
[+]
query-pagination-numbers
[+]
navigation-link
[+]
terms-query