PATH:
home
/
hunkmedicalstaff
/
.trash
/
wp-includes
/
blocks
<?php /** * Server-side rendering of the `core/read-more` block. * * @package WordPress */ /** * Renders the `core/read-more` block on the server. * * @since 6.0.0 * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. * @return string Returns the post link. */ function render_block_core_read_more( $attributes, $content, $block ) { if ( ! isset( $block->context['postId'] ) ) { return ''; } $post_ID = $block->context['postId']; $post_title = get_the_title( $post_ID ); if ( '' === $post_title ) { $post_title = sprintf( /* translators: %s is post ID to describe the link for screen readers. */ __( 'untitled post %s' ), $post_ID ); } $screen_reader_text = sprintf( /* translators: %s is either the post title or post ID to describe the link for screen readers. */ __( ': %s' ), $post_title ); $justify_class_name = empty( $attributes['justifyContent'] ) ? '' : "is-justified-{$attributes['justifyContent']}"; $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $justify_class_name ) ); $more_text = ! empty( $attributes['content'] ) ? wp_kses_post( $attributes['content'] ) : __( 'Read more' ); return sprintf( '<a %1s href="%2s" target="%3s">%4s<span class="screen-reader-text">%5s</span></a>', $wrapper_attributes, get_the_permalink( $post_ID ), esc_attr( $attributes['linkTarget'] ), $more_text, $screen_reader_text ); } /** * Registers the `core/read-more` block on the server. * * @since 6.0.0 */ function register_block_core_read_more() { register_block_type_from_metadata( __DIR__ . '/read-more', array( 'render_callback' => 'render_block_core_read_more', ) ); } add_action( 'init', 'register_block_core_read_more' );
[+]
freeform
[+]
page-list-item
[-] query-pagination-numbers.php
[edit]
[+]
comment-content
[+]
comments-title
[-] tag-cloud.php
[edit]
[-] query-pagination-previous.php
[edit]
[-] post-excerpt.php
[edit]
[-] index.php
[edit]
[-] widget-group.php
[edit]
[+]
post-comments-form
[+]
comment-author-name
[+]
template-part
[-] site-tagline.php
[edit]
[-] post-featured-image.php
[edit]
[-] comment-template.php
[edit]
[+]
widget-group
[+]
query-pagination-previous
[+]
block
[-] latest-posts.php
[edit]
[-] search.php
[edit]
[-] comments-pagination.php
[edit]
[+]
table
[-] navigation-submenu.php
[edit]
[-] post-navigation-link.php
[edit]
[+]
pattern
[+]
heading
[-] comment-content.php
[edit]
[+]
audio
[+]
paragraph
[+]
nextpage
[+]
tag-cloud
[+]
categories
[-] term-description.php
[edit]
[+]
image
[+]
query-pagination-numbers
[+]
post-author-biography
[+]
post-terms
[+]
navigation-submenu
[-] read-more.php
[edit]
[+]
site-tagline
[-] legacy-widget.php
[edit]
[-] page-list-item.php
[edit]
[-] query-title.php
[edit]
[-] categories.php
[edit]
[+]
list-item
[-] require-dynamic-blocks.php
[edit]
[+]
rss
[+]
html
[-] comments-pagination-numbers.php
[edit]
[+]
column
[+]
separator
[+]
quote
[+]
legacy-widget
[+]
code
[+]
comments
[+]
file
[+]
buttons
[-] image.php
[edit]
[-] cover.php
[edit]
[-] site-logo.php
[edit]
[+]
pullquote
[-] comments-pagination-next.php
[edit]
[-] query.php
[edit]
[+]
navigation-link
[+]
list
[+]
query-pagination-next
[-] comment-author-name.php
[edit]
[+]
comments-pagination
[-] post-comments-form.php
[edit]
[-] heading.php
[edit]
[-] post-date.php
[edit]
[+]
comments-pagination-next
[-] navigation.php
[edit]
[-] comments.php
[edit]
[+]
comments-pagination-numbers
[+]
preformatted
[-] query-pagination.php
[edit]
[-] loginout.php
[edit]
[+]
post-author-name
[+]
group
[-] template-part.php
[edit]
[-] home-link.php
[edit]
[+]
shortcode
[+]
query-title
[+]
latest-posts
[-] comment-reply-link.php
[edit]
[-] calendar.php
[edit]
[+]
comment-edit-link
[+]
video
[-] query-no-results.php
[edit]
[-] rss.php
[edit]
[-] comment-date.php
[edit]
[+]
query-total
[+]
post-featured-image
[+]
comments-pagination-previous
[+]
details
[+]
gallery
[+]
comment-template
[-] comments-pagination-previous.php
[edit]
[-] query-total.php
[edit]
[-] page-list.php
[edit]
[+]
read-more
[-] social-link.php
[edit]
[+]
post-excerpt
[-] post-author-biography.php
[edit]
[+]
post-template
[+]
post-title
[+]
navigation
[+]
..
[+]
button
[+]
query-pagination
[+]
post-author
[-] gallery.php
[edit]
[+]
page-list
[+]
post-date
[-] media-text.php
[edit]
[-] archives.php
[edit]
[-] footnotes.php
[edit]
[+]
spacer
[+]
latest-comments
[-] shortcode.php
[edit]
[-] navigation-link.php
[edit]
[+]
archives
[+]
columns
[+]
post-navigation-link
[-] site-title.php
[edit]
[-] require-static-blocks.php
[edit]
[+]
site-logo
[+]
loginout
[+]
search
[+]
term-description
[-] post-title.php
[edit]
[-] post-terms.php
[edit]
[+]
embed
[-] blocks-json.php
[edit]
[+]
more
[+]
media-text
[-] list.php
[edit]
[+]
cover
[+]
query-no-results
[+]
site-title
[+]
footnotes
[+]
missing
[+]
post-content
[-] comment-edit-link.php
[edit]
[+]
social-link
[+]
home-link
[-] post-content.php
[edit]
[-] post-author-name.php
[edit]
[-] post-author.php
[edit]
[+]
calendar
[-] avatar.php
[edit]
[-] pattern.php
[edit]
[-] query-pagination-next.php
[edit]
[-] file.php
[edit]
[+]
query
[+]
verse
[-] button.php
[edit]
[+]
avatar
[+]
comment-reply-link
[+]
text-columns
[+]
social-links
[+]
comment-date
[-] block.php
[edit]
[-] latest-comments.php
[edit]
[-] comments-title.php
[edit]
[-] post-template.php
[edit]