PATH:
home
/
pallya5
/
afiaplace.com.bak
/
wp-includes
/
blocks
<?php /** * Server-side rendering of the `core/post-content` block. * * @package WordPress */ /** * Renders the `core/post-content` 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 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 = defined( 'WP_DEBUG' ) && WP_DEBUG && defined( 'WP_DEBUG_DISPLAY' ) && 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; // Check is needed for backward compatibility with third-party plugins // that might rely on the `in_the_loop` check; calling `the_post` sets it to true. if ( ! in_the_loop() && have_posts() ) { the_post(); } // 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( null, false ); // 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 ''; } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => 'entry-content' ) ); return ( '<div ' . $wrapper_attributes . '>' . $content . '</div>' ); } /** * Registers the `core/post-content` block on the server. */ 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' );
[-] legacy-widget.php
[edit]
[-] post-excerpt.php
[edit]
[+]
archives
[-] navigation-submenu.php
[edit]
[+]
embed
[-] navigation.php
[edit]
[+]
query-pagination
[-] index.php
[edit]
[+]
query-title
[+]
freeform
[+]
audio
[+]
query-pagination-previous
[-] file.php
[edit]
[-] search.php
[edit]
[-] query-pagination-numbers.php
[edit]
[+]
quote
[-] archives.php
[edit]
[-] query-pagination.php
[edit]
[+]
cover
[+]
navigation-link
[+]
navigation
[+]
table
[-] site-title.php
[edit]
[-] term-description.php
[edit]
[-] post-navigation-link.php
[edit]
[+]
block
[+]
paragraph
[+]
calendar
[+]
code
[-] shortcode.php
[edit]
[+]
file
[-] rss.php
[edit]
[+]
post-date
[-] post-comments.php
[edit]
[+]
gallery
[+]
nextpage
[+]
site-title
[+]
post-terms
[-] image.php
[edit]
[-] social-link.php
[edit]
[+]
post-excerpt
[-] block.php
[edit]
[+]
shortcode
[+]
page-list
[+]
separator
[+]
social-link
[-] post-author.php
[edit]
[-] template-part.php
[edit]
[+]
latest-comments
[+]
html
[+]
spacer
[+]
heading
[-] post-date-other.php
[edit]
[-] site-tagline.php
[edit]
[-] query-pagination-next.php
[edit]
[+]
group
[+]
categories
[-] query-pagination-previous.php
[edit]
[+]
social-links
[+]
site-tagline
[+]
query
[-] site-logo.php
[edit]
[-] calendar.php
[edit]
[+]
loginout
[+]
column
[+]
latest-posts
[+]
site-logo
[-] post-content.php
[edit]
[+]
buttons
[+]
button
[+]
post-title
[+]
post-featured-image
[-] post-date.php
[edit]
[-] index-sample.php
[edit]
[-] post-template.php
[edit]
[-] query-title.php
[edit]
[+]
term-description
[-] post-terms.php
[edit]
[-] widget-group.php
[edit]
[+]
search
[+]
preformatted
[+]
tag-cloud
[+]
list
[-] latest-posts.php
[edit]
[+]
query-pagination-numbers
[-] loginout.php
[edit]
[+]
image
[-] post-featured-image.php
[edit]
[+]
more
[+]
verse
[+]
text-columns
[-] tag-cloud.php
[edit]
[+]
columns
[+]
missing
[+]
post-comments
[+]
post-content
[+]
post-template
[+]
query-pagination-next
[+]
post-navigation-link
[-] categories.php
[edit]
[+]
pattern
[-] navigation-link.php
[edit]
[+]
rss
[-] latest-comments.php
[edit]
[-] query.php
[edit]
[-] page-list.php
[edit]
[+]
..
[-] pattern.php
[edit]
[-] gallery.php
[edit]
[+]
widget-group
[+]
post-author
[+]
pullquote
[-] social-link-first.php
[edit]
[+]
legacy-widget
[-] post-title.php
[edit]
[+]
navigation-submenu
[+]
template-part
[+]
video
[+]
media-text