PATH:
home
/
centosnipponia
/
public_html
/
BAK_doohannl
/
wp-includes
/
blocks
<?php /** * Server-side rendering of the `core/post-author` block. * * @package WordPress */ /** * Renders the `core/post-author` block on the server. * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. * @return string Returns the rendered author block. */ function render_block_core_post_author( $attributes, $content, $block ) { if ( ! isset( $block->context['postId'] ) ) { $author_id = get_query_var( 'author' ); } else { $author_id = get_post_field( 'post_author', $block->context['postId'] ); } if ( empty( $author_id ) ) { return ''; } $avatar = ! empty( $attributes['avatarSize'] ) ? get_avatar( $author_id, $attributes['avatarSize'] ) : null; $byline = ! empty( $attributes['byline'] ) ? $attributes['byline'] : false; $classes = array_merge( isset( $attributes['itemsJustification'] ) ? array( 'items-justified-' . $attributes['itemsJustification'] ) : array(), isset( $attributes['textAlign'] ) ? array( 'has-text-align-' . $attributes['textAlign'] ) : array() ); $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) ); return sprintf( '<div %1$s>', $wrapper_attributes ) . ( ! empty( $attributes['showAvatar'] ) ? '<div class="wp-block-post-author__avatar">' . $avatar . '</div>' : '' ) . '<div class="wp-block-post-author__content">' . ( ! empty( $byline ) ? '<p class="wp-block-post-author__byline">' . wp_kses_post( $byline ) . '</p>' : '' ) . '<p class="wp-block-post-author__name">' . get_the_author_meta( 'display_name', $author_id ) . '</p>' . ( ! empty( $attributes['showBio'] ) ? '<p class="wp-block-post-author__bio">' . get_the_author_meta( 'user_description', $author_id ) . '</p>' : '' ) . '</div>' . '</div>'; } /** * Registers the `core/post-author` block on the server. */ function register_block_core_post_author() { register_block_type_from_metadata( __DIR__ . '/post-author', array( 'render_callback' => 'render_block_core_post_author', ) ); } add_action( 'init', 'register_block_core_post_author' );
[+]
..
[-] social-link.php
[edit]
[+]
quote
[-] query-pagination-next.php
[edit]
[+]
preformatted
[-] error_log
[edit]
[-] archives.php
[edit]
[+]
social-links
[-] rss.php
[edit]
[+]
code
[+]
paragraph
[-] latest-posts.php
[edit]
[+]
list
[-] loginout.php
[edit]
[+]
tag-cloud
[+]
post-content
[-] index.php
[edit]
[+]
loginout
[+]
buttons
[+]
archives
[+]
query-pagination-numbers
[-] post-terms.php
[edit]
[+]
image
[+]
site-title
[-] file.php
[edit]
[-] post-template.php
[edit]
[+]
site-logo
[+]
query-pagination
[+]
post-excerpt
[+]
audio
[+]
social-link
[-] post-date.php
[edit]
[+]
latest-posts
[+]
query-pagination-previous
[+]
media-text
[+]
categories
[-] site-logo.php
[edit]
[+]
more
[-] categories.php
[edit]
[-] legacy-widget.php
[edit]
[+]
spacer
[+]
missing
[-] calendar.php
[edit]
[+]
group
[+]
separator
[-] query.php
[edit]
[+]
column
[+]
page-list
[-] shortcode.php
[edit]
[-] post-content.php
[edit]
[-] latest-comments.php
[edit]
[+]
text-columns
[+]
legacy-widget
[+]
verse
[-] query-pagination.php
[edit]
[+]
rss
[+]
shortcode
[+]
file
[+]
cover
[+]
html
[-] post-featured-image.php
[edit]
[-] query-title.php
[edit]
[+]
button
[+]
latest-comments
[+]
classic
[-] site-title.php
[edit]
[+]
heading
[-] query-pagination-previous.php
[edit]
[-] site-tagline.php
[edit]
[+]
block
[+]
gallery
[+]
post-title
[+]
search
[+]
embed
[+]
post-featured-image
[-] query-pagination-numbers.php
[edit]
[+]
query-pagination-next
[-] post-title.php
[edit]
[+]
post-template
[+]
nextpage
[+]
query-title
[+]
post-date
[+]
columns
[+]
freeform
[+]
pullquote
[-] block.php
[edit]
[-] tag-cloud.php
[edit]
[+]
table
[+]
video
[-] search.php
[edit]
[+]
post-terms
[+]
calendar
[-] post-excerpt.php
[edit]
[+]
query
[-] page-list.php
[edit]
[+]
site-tagline
[+]
navigation
[+]
navigation-link
[+]
navigation-submenu
[+]
pattern
[+]
post-author
[-] .htaccess.disabled
[edit]
[+]
post-navigation-link
[+]
template-part
[+]
term-description
[+]
widget-group
[-] navigation-link.php
[edit]
[-] image.php
[edit]
[-] widget-group.php
[edit]
[-] post-author.php
[edit]
[-] navigation-submenu.php
[edit]
[-] post-navigation-link.php
[edit]
[-] gallery.php
[edit]
[-] template-part.php
[edit]
[-] term-description.php
[edit]
[-] pattern.php
[edit]
[-] navigation.php
[edit]
[+]
avatar
[+]
comment-author-name
[+]
comment-content
[+]
comment-date
[+]
comment-edit-link
[+]
comment-reply-link
[+]
comment-template
[+]
comments-pagination
[+]
comments-pagination-next
[+]
comments-pagination-numbers
[+]
comments-pagination-previous
[+]
comments-title
[+]
home-link
[+]
post-author-biography
[+]
post-comments-form
[+]
query-no-results
[+]
read-more
[-] comments-pagination-next.php
[edit]
[-] comment-date.php
[edit]
[-] comments-pagination.php
[edit]
[-] comments-pagination-numbers.php
[edit]
[-] home-link.php
[edit]
[-] cover.php
[edit]
[-] post-comments-form.php
[edit]
[-] comment-content.php
[edit]
[-] comments-pagination-previous.php
[edit]
[-] query-no-results.php
[edit]
[-] comment-edit-link.php
[edit]
[-] comment-author-name.php
[edit]
[-] read-more.php
[edit]
[-] post-author-biography.php
[edit]
[-] avatar.php
[edit]
[-] comment-template.php
[edit]
[-] comments-title.php
[edit]
[-] comment-reply-link.php
[edit]
[+]
comments
[+]
list-item
[-] require-dynamic-blocks.php
[edit]
[-] require-static-blocks.php
[edit]
[-] blocks-json.php
[edit]
[-] comments.php
[edit]