golden hour
/home/phakp/public_html/wp-includes/blocks
⬆️ Go Up
Upload
File/Folder
Size
Actions
archives
-
Del
OK
archives.php
2.85 KB
Del
OK
audio
-
Del
OK
avatar
-
Del
OK
avatar.php
5.28 KB
Del
OK
block
-
Del
OK
block.php
1.63 KB
Del
OK
button
-
Del
OK
buttons
-
Del
OK
calendar
-
Del
OK
calendar.php
4.57 KB
Del
OK
categories
-
Del
OK
categories.php
2.72 KB
Del
OK
classic
-
Del
OK
code
-
Del
OK
column
-
Del
OK
columns
-
Del
OK
comment-author-name
-
Del
OK
comment-author-name.php
1.89 KB
Del
OK
comment-content
-
Del
OK
comment-content.php
2.23 KB
Del
OK
comment-date
-
Del
OK
comment-date.php
1.47 KB
Del
OK
comment-edit-link
-
Del
OK
comment-edit-link.php
1.5 KB
Del
OK
comment-reply-link
-
Del
OK
comment-reply-link.php
1.86 KB
Del
OK
comment-template
-
Del
OK
comment-template.php
3.26 KB
Del
OK
comments-pagination
-
Del
OK
comments-pagination-next
-
Del
OK
comments-pagination-next.php
1.8 KB
Del
OK
comments-pagination-numbers
-
Del
OK
comments-pagination-numbers.php
1.56 KB
Del
OK
comments-pagination-previous
-
Del
OK
comments-pagination-previous.php
1.6 KB
Del
OK
comments-pagination.php
967 B
Del
OK
comments-query-loop
-
Del
OK
comments-title
-
Del
OK
comments-title.php
2.67 KB
Del
OK
cover
-
Del
OK
cover.php
2.18 KB
Del
OK
embed
-
Del
OK
error_log
290 B
Del
OK
file
-
Del
OK
file.php
899 B
Del
OK
freeform
-
Del
OK
gallery
-
Del
OK
gallery.php
3.69 KB
Del
OK
group
-
Del
OK
heading
-
Del
OK
home-link
-
Del
OK
home-link.php
4.97 KB
Del
OK
html
-
Del
OK
image
-
Del
OK
image.php
1.27 KB
Del
OK
index.php
4.19 KB
Del
OK
latest-comments
-
Del
OK
latest-comments.php
4.88 KB
Del
OK
latest-posts
-
Del
OK
latest-posts.php
7.28 KB
Del
OK
legacy-widget
-
Del
OK
legacy-widget.php
3.81 KB
Del
OK
list
-
Del
OK
loginout
-
Del
OK
loginout.php
1.35 KB
Del
OK
media-text
-
Del
OK
missing
-
Del
OK
more
-
Del
OK
navigation
-
Del
OK
navigation-link
-
Del
OK
navigation-link.php
10.96 KB
Del
OK
navigation-submenu
-
Del
OK
navigation-submenu.php
9.53 KB
Del
OK
navigation.php
25.23 KB
Del
OK
nextpage
-
Del
OK
page-list
-
Del
OK
page-list.php
12.83 KB
Del
OK
paragraph
-
Del
OK
pattern
-
Del
OK
pattern.php
921 B
Del
OK
post-author
-
Del
OK
post-author-biography
-
Del
OK
post-author-biography.php
1.41 KB
Del
OK
post-author.php
2.05 KB
Del
OK
post-comments
-
Del
OK
post-comments-form
-
Del
OK
post-comments-form.php
2.5 KB
Del
OK
post-comments.php
2.43 KB
Del
OK
post-content
-
Del
OK
post-content.php
2.34 KB
Del
OK
post-date
-
Del
OK
post-date.php
1.51 KB
Del
OK
post-excerpt
-
Del
OK
post-excerpt.php
2.43 KB
Del
OK
post-featured-image
-
Del
OK
post-featured-image.php
2.14 KB
Del
OK
post-navigation-link
-
Del
OK
post-navigation-link.php
3.51 KB
Del
OK
post-template
-
Del
OK
post-template.php
3.94 KB
Del
OK
post-terms
-
Del
OK
post-terms.php
1.61 KB
Del
OK
post-title
-
Del
OK
post-title.php
1.62 KB
Del
OK
preformatted
-
Del
OK
pullquote
-
Del
OK
query
-
Del
OK
query-no-results
-
Del
OK
query-no-results.php
1.58 KB
Del
OK
query-pagination
-
Del
OK
query-pagination-next
-
Del
OK
query-pagination-next.php
2.66 KB
Del
OK
query-pagination-numbers
-
Del
OK
query-pagination-numbers.php
3.73 KB
Del
OK
query-pagination-previous
-
Del
OK
query-pagination-previous.php
2.12 KB
Del
OK
query-pagination.php
1023 B
Del
OK
query-title
-
Del
OK
query-title.php
1.35 KB
Del
OK
query.php
304 B
Del
OK
quote
-
Del
OK
read-more
-
Del
OK
read-more.php
1.31 KB
Del
OK
rss
-
Del
OK
rss.php
3.85 KB
Del
OK
search
-
Del
OK
search.php
12.74 KB
Del
OK
separator
-
Del
OK
shortcode
-
Del
OK
shortcode.php
697 B
Del
OK
site-logo
-
Del
OK
site-logo.php
5.67 KB
Del
OK
site-tagline
-
Del
OK
site-tagline.php
994 B
Del
OK
site-title
-
Del
OK
site-title.php
1.68 KB
Del
OK
social-link
-
Del
OK
social-link.php
57.56 KB
Del
OK
social-links
-
Del
OK
spacer
-
Del
OK
table
-
Del
OK
tag-cloud
-
Del
OK
tag-cloud.php
1.6 KB
Del
OK
template-part
-
Del
OK
template-part.php
7.24 KB
Del
OK
term-description
-
Del
OK
term-description.php
1.14 KB
Del
OK
text-columns
-
Del
OK
verse
-
Del
OK
video
-
Del
OK
widget-group
-
Del
OK
widget-group.php
2.12 KB
Del
OK
Edit: avatar.php
<?php /** * Server-side rendering of the `core/avatar` block. * * @package WordPress */ /** * Renders the `core/avatar` block on the server. * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. * @return string Return the avatar. */ function render_block_core_avatar( $attributes, $content, $block ) { $size = isset( $attributes['size'] ) ? $attributes['size'] : 96; $wrapper_attributes = get_block_wrapper_attributes(); $image_styles = array(); // Add border width styles. $has_border_width = ! empty( $attributes['style']['border']['width'] ); if ( $has_border_width ) { $border_width = $attributes['style']['border']['width']; $image_styles[] = sprintf( 'border-width: %s;', esc_attr( $border_width ) ); } // Add border radius styles. $has_border_radius = ! empty( $attributes['style']['border']['radius'] ); if ( $has_border_radius ) { $border_radius = $attributes['style']['border']['radius']; if ( is_array( $border_radius ) ) { // Apply styles for individual corner border radii. foreach ( $border_radius as $key => $value ) { if ( null !== $value ) { $name = _wp_to_kebab_case( $key ); // Add shared styles for individual border radii. $border_style = sprintf( 'border-%s-radius: %s;', esc_attr( $name ), esc_attr( $value ) ); $image_styles[] = $border_style; } } } else { $border_style = sprintf( 'border-radius: %s;', esc_attr( $border_radius ) ); $image_styles[] = $border_style; } } // Add border color styles. $has_border_color = ! empty( $attributes['style']['border']['color'] ); if ( $has_border_color ) { $border_color = $attributes['style']['border']['color']; $image_styles[] = sprintf( 'border-color: %s;', esc_attr( $border_color ) ); } // Add border style (solid, dashed, dotted ). $has_border_style = ! empty( $attributes['style']['border']['style'] ); if ( $has_border_style ) { $border_style = $attributes['style']['border']['style']; $image_styles[] = sprintf( 'border-style: %s;', esc_attr( $border_style ) ); } // Add border classes to the avatar image for both custom colors and palette colors. $image_classes = ''; if ( $has_border_color || isset( $attributes['borderColor'] ) ) { $image_classes .= 'has-border-color'; } if ( isset( $attributes['borderColor'] ) ) { $image_classes .= ' has-' . $attributes['borderColor'] . '-border-color'; } if ( ! isset( $block->context['commentId'] ) ) { $author_id = isset( $attributes['userId'] ) ? $attributes['userId'] : get_post_field( 'post_author', $block->context['postId'] ); $author_name = get_the_author_meta( 'display_name', $author_id ); // translators: %s is the Author name. $alt = sprintf( __( '%s Avatar' ), $author_name ); $avatar_block = get_avatar( $author_id, $size, '', $alt, array( 'extra_attr' => isset( $image_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $image_styles ) ) ) : '', 'class' => "wp-block-avatar__image $image_classes ", ) ); if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { $label = ''; if ( '_blank' === $attributes['linkTarget'] ) { // translators: %s is the Author name. $label = 'aria-label="' . esc_attr( sprintf( __( '(%s author archive, opens in a new tab)' ), $author_name ) ) . '"'; } // translators: %1$s: Author archive link. %2$s: Link target. %3$s Aria label. %4$s Avatar image. $avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block ); } return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block ); } $comment = get_comment( $block->context['commentId'] ); /* translators: %s is the Comment Author name */ $alt = sprintf( __( '%s Avatar' ), $comment->comment_author ); if ( ! $comment ) { return ''; } $avatar_block = get_avatar( $comment, $size, '', $alt, array( 'extra_attr' => isset( $image_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $image_styles ) ) ) : '', 'class' => "wp-block-avatar__image $image_classes", ) ); if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $comment->comment_author_url ) && '' !== $comment->comment_author_url ) { $label = ''; if ( '_blank' === $attributes['linkTarget'] ) { // translators: %s is the Comment Author name. $label = 'aria-label="' . esc_attr( sprintf( __( '(%s website link, opens in a new tab)' ), $comment->comment_author ) ) . '"'; } // translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image. $avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', $comment->comment_author_url, esc_attr( $attributes['linkTarget'] ), $label, $avatar_block ); } return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block ); } /** * Registers the `core/avatar` block on the server. */ function register_block_core_avatar() { register_block_type_from_metadata( __DIR__ . '/avatar', array( 'render_callback' => 'render_block_core_avatar', ) ); } add_action( 'init', 'register_block_core_avatar' );
Save