PATH:
home
/
thecwrif
/
public_html
/
wp-includes
/
blocks
<?php /** * Server-side rendering of the `core/site-title` block. * * @package WordPress */ /** * Renders the `core/site-title` block on the server. * * @since 5.8.0 * * @param array $attributes The block attributes. * * @return string The render. */ function render_block_core_site_title( $attributes ) { $site_title = get_bloginfo( 'name' ); if ( ! trim( $site_title ) ) { return ''; } $tag_name = 'h1'; $classes = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}"; if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) { $classes .= ' has-link-color'; } if ( isset( $attributes['level'] ) ) { $tag_name = 0 === $attributes['level'] ? 'p' : 'h' . (int) $attributes['level']; } if ( $attributes['isLink'] ) { $aria_current = ! is_paged() && ( is_front_page() || is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ? ' aria-current="page"' : ''; $link_target = ! empty( $attributes['linkTarget'] ) ? $attributes['linkTarget'] : '_self'; $site_title = sprintf( '<a href="%1$s" target="%2$s" rel="home"%3$s>%4$s</a>', esc_url( home_url() ), esc_attr( $link_target ), $aria_current, esc_html( $site_title ) ); } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => trim( $classes ) ) ); return sprintf( '<%1$s %2$s>%3$s</%1$s>', $tag_name, $wrapper_attributes, // already pre-escaped if it is a link. $attributes['isLink'] ? $site_title : esc_html( $site_title ) ); } /** * Registers the `core/site-title` block on the server. * * @since 5.8.0 */ function register_block_core_site_title() { register_block_type_from_metadata( __DIR__ . '/site-title', array( 'render_callback' => 'render_block_core_site_title', ) ); } add_action( 'init', 'register_block_core_site_title' );
[+]
..
[+]
terms-query
[+]
comment-edit-link
[+]
list
[-] query-total.php
[edit]
[-] media-text.php
[edit]
[+]
site-tagline
[+]
audio
[-] blocks-json.php
[edit]
[+]
navigation-submenu
[+]
post-date
[+]
comments-pagination-next
[-] comments-pagination-next.php
[edit]
[+]
post-author-biography
[-] navigation-submenu.php
[edit]
[+]
navigation
[+]
home-link
[+]
query-pagination-numbers
[-] tag-cloud.php
[edit]
[-] shortcode.php
[edit]
[-] list.php
[edit]
[-] term-description.php
[edit]
[-] page-list-item.php
[edit]
[+]
social-links
[-] post-comments-count.php
[edit]
[+]
post-comments-link
[+]
file
[-] pattern.php
[edit]
[+]
latest-posts
[+]
post-navigation-link
[-] post-author-biography.php
[edit]
[-] footnotes.php
[edit]
[+]
post-template
[-] post-title.php
[edit]
[+]
preformatted
[-] query-pagination-next.php
[edit]
[+]
paragraph
[+]
page-list
[+]
post-comments-count
[+]
term-count
[-] post-terms.php
[edit]
[+]
navigation-link
[-] accordion.php
[edit]
[-] post-time-to-read.php
[edit]
[+]
query-pagination-next
[-] template-part.php
[edit]
[-] home-link.php
[edit]
[+]
categories
[+]
site-title
[+]
avatar
[+]
comment-content
[+]
shortcode
[-] site-title.php
[edit]
[+]
term-template
[+]
embed
[+]
verse
[+]
template-part
[-] loginout.php
[edit]
[-] rss.php
[edit]
[-] page-list.php
[edit]
[+]
accordion-panel
[+]
latest-comments
[-] heading.php
[edit]
[+]
more
[+]
quote
[+]
comments
[-] search.php
[edit]
[-] comment-date.php
[edit]
[-] error_log
[edit]
[-] latest-comments.php
[edit]
[+]
post-comments-form
[+]
text-columns
[-] require-dynamic-blocks.php
[edit]
[-] block.php
[edit]
[+]
read-more
[+]
nextpage
[+]
columns
[-] term-name.php
[edit]
[-] calendar.php
[edit]
[+]
group
[+]
query-title
[-] post-template.php
[edit]
[+]
separator
[+]
pullquote
[-] post-date.php
[edit]
[-] comment-author-name.php
[edit]
[-] query-no-results.php
[edit]
[-] site-logo.php
[edit]
[+]
post-author
[-] read-more.php
[edit]
[+]
video
[+]
comment-reply-link
[-] image.php
[edit]
[-] comment-edit-link.php
[edit]
[-] navigation.php
[edit]
[-] comments-pagination.php
[edit]
[+]
post-title
[+]
query-no-results
[+]
widget-group
[-] comment-template.php
[edit]
[+]
query-total
[+]
rss
[+]
social-link
[-] post-author-name.php
[edit]
[+]
column
[+]
buttons
[-] term-count.php
[edit]
[-] comments.php
[edit]
[+]
spacer
[+]
code
[-] index.php
[edit]
[+]
site-logo
[+]
image
[+]
table
[+]
query-pagination
[+]
footnotes
[-] button.php
[edit]
[+]
comments-title
[+]
pattern
[+]
cover
[+]
list-item
[+]
block
[+]
media-text
[-] comment-content.php
[edit]
[-] term-template.php
[edit]
[+]
post-author-name
[-] post-comments-link.php
[edit]
[-] file.php
[edit]
[-] social-link.php
[edit]
[+]
details
[+]
tag-cloud
[-] gallery.php
[edit]
[-] widget-group.php
[edit]
[-] comments-title.php
[edit]
[+]
heading
[-] query-pagination-numbers.php
[edit]
[+]
query
[+]
gallery
[-] post-navigation-link.php
[edit]
[-] post-excerpt.php
[edit]
[+]
legacy-widget
[+]
post-featured-image
[+]
button
[+]
html
[-] post-content.php
[edit]
[-] query.php
[edit]
[-] accordion-item.php
[edit]
[-] post-comments-form.php
[edit]
[+]
page-list-item
[-] query-title.php
[edit]
[-] cover.php
[edit]
[-] comment-reply-link.php
[edit]
[+]
archives
[-] archives.php
[edit]
[-] categories.php
[edit]
[+]
accordion-heading
[+]
post-excerpt
[+]
query-pagination-previous
[+]
freeform
[+]
search
[-] comments-pagination-numbers.php
[edit]
[-] latest-posts.php
[edit]
[-] navigation-link.php
[edit]
[+]
loginout
[+]
comments-pagination
[-] site-tagline.php
[edit]
[+]
comments-pagination-previous
[+]
math
[-] post-author.php
[edit]
[-] query-pagination.php
[edit]
[+]
post-content
[-] require-static-blocks.php
[edit]
[+]
accordion
[+]
post-time-to-read
[+]
calendar
[+]
comment-date
[+]
comments-pagination-numbers
[-] comments-pagination-previous.php
[edit]
[+]
term-name
[+]
term-description
[-] avatar.php
[edit]
[+]
comment-template
[+]
accordion-item
[-] legacy-widget.php
[edit]
[+]
post-terms
[-] query-pagination-previous.php
[edit]
[-] post-featured-image.php
[edit]
[-] video.php
[edit]
[+]
missing
[+]
comment-author-name