PATH:
home
/
thecwrif
/
public_html
/
wp-includes
/
blocks
<?php /** * Server-side rendering of the `core/post-content` block. * * @package WordPress */ /** * Renders the `core/post-content` block on the server. * * @since 5.8.0 * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. * @return string Returns the filtered post content of the current post. */ function render_block_core_post_content( $attributes, $content, $block ) { static $seen_ids = array(); if ( ! isset( $block->context['postId'] ) ) { return ''; } $post_id = $block->context['postId']; if ( isset( $seen_ids[ $post_id ] ) ) { // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent // is set in `wp_debug_mode()`. $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY; return $is_debug ? // translators: Visible only in the front end, this warning takes the place of a faulty block. __( '[block rendering halted]' ) : ''; } $seen_ids[ $post_id ] = true; // When inside the main loop, we want to use queried object // so that `the_preview` for the current post can apply. // We force this behavior by omitting the third argument (post ID) from the `get_the_content`. $content = get_the_content(); // Check for nextpage to display page links for paginated posts. if ( has_block( 'core/nextpage' ) ) { $content .= wp_link_pages( array( 'echo' => 0 ) ); } /** This filter is documented in wp-includes/post-template.php */ $content = apply_filters( 'the_content', str_replace( ']]>', ']]>', $content ) ); unset( $seen_ids[ $post_id ] ); if ( empty( $content ) ) { return ''; } $tag_name = 'div'; if ( ! empty( $attributes['tagName'] ) && tag_escape( $attributes['tagName'] ) === $attributes['tagName'] ) { $tag_name = $attributes['tagName']; } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => 'entry-content' ) ); return sprintf( '<%1$s %2$s>%3$s</%1$s>', $tag_name, $wrapper_attributes, $content ); } /** * Registers the `core/post-content` block on the server. * * @since 5.8.0 */ function register_block_core_post_content() { register_block_type_from_metadata( __DIR__ . '/post-content', array( 'render_callback' => 'render_block_core_post_content', ) ); } add_action( 'init', 'register_block_core_post_content' );
[+]
..
[+]
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