Priority File Manager

📁 public_html
Base Directory:
/home/ecedu/public_html/wp-includes/blocks
NameTypeSizeActions
📁 .. Folder -
📁 archives Folder -
📄 archives.php File 2994
Edit Download
📁 audio Folder -
📁 avatar Folder -
📄 avatar.php File 5745
Edit Download
📁 block Folder -
📄 block.php File 3314
Edit Download
📄 blocks-json.php File 193945
Edit Download
📁 button Folder -
📄 button.php File 1805
Edit Download
📁 buttons Folder -
📁 calendar Folder -
📄 calendar.php File 6075
Edit Download
📁 categories Folder -
📄 categories.php File 4010
Edit Download
📁 code Folder -
📁 column Folder -
📁 columns Folder -
📁 comment-author-name Folder -
📄 comment-author-name.php File 2133
Edit Download
📁 comment-content Folder -
📄 comment-content.php File 2459
Edit Download
📁 comment-date Folder -
📄 comment-date.php File 1863
Edit Download
📁 comment-edit-link Folder -
📄 comment-edit-link.php File 1713
Edit Download
📁 comment-reply-link Folder -
📄 comment-reply-link.php File 2075
Edit Download
📁 comment-template Folder -
📄 comment-template.php File 4494
Edit Download
📁 comments Folder -
📁 comments-pagination Folder -
📁 comments-pagination-next Folder -
📄 comments-pagination-next.php File 1924
Edit Download
📁 comments-pagination-numbers Folder -
📄 comments-pagination-numbers.php File 1632
Edit Download
📁 comments-pagination-previous Folder -
📄 comments-pagination-previous.php File 1790
Edit Download
📄 comments-pagination.php File 1199
Edit Download
📁 comments-title Folder -
📄 comments-title.php File 2772
Edit Download
📄 comments.php File 6767
Edit Download
📁 cover Folder -
📄 cover.php File 3175
Edit Download
📁 details Folder -
📁 embed Folder -
📁 file Folder -
📄 file.php File 1793
Edit Download
📁 footnotes Folder -
📄 footnotes.php File 3771
Edit Download
📁 freeform Folder -
📁 gallery Folder -
📄 gallery.php File 6438
Edit Download
📁 group Folder -
📁 heading Folder -
📄 heading.php File 1301
Edit Download
📁 home-link Folder -
📄 home-link.php File 5438
Edit Download
📁 html Folder -
📁 image Folder -
📄 image.php File 12023
Edit Download
📄 index.php File 5111
Edit Download
📁 latest-comments Folder -
📄 latest-comments.php File 5040
Edit Download
📁 latest-posts Folder -
📄 latest-posts.php File 8542
Edit Download
📁 legacy-widget Folder -
📄 legacy-widget.php File 3997
Edit Download
📁 list Folder -
📁 list-item Folder -
📄 list.php File 1273
Edit Download
📁 loginout Folder -
📄 loginout.php File 1418
Edit Download
📁 media-text Folder -
📄 media-text.php File 4383
Edit Download
📁 missing Folder -
📁 more Folder -
📁 navigation Folder -
📁 navigation-link Folder -
📄 navigation-link.php File 13913
Edit Download
📁 navigation-submenu Folder -
📄 navigation-submenu.php File 9943
Edit Download
📄 navigation.php File 49620
Edit Download
📁 nextpage Folder -
📁 page-list Folder -
📁 page-list-item Folder -
📄 page-list-item.php File 361
Edit Download
📄 page-list.php File 13611
Edit Download
📁 paragraph Folder -
📁 pattern Folder -
📄 pattern.php File 1788
Edit Download
📁 post-author Folder -
📁 post-author-biography Folder -
📄 post-author-biography.php File 1524
Edit Download
📁 post-author-name Folder -
📄 post-author-name.php File 1951
Edit Download
📄 post-author.php File 2734
Edit Download
📁 post-comments-form Folder -
📄 post-comments-form.php File 2805
Edit Download
📁 post-content Folder -
📄 post-content.php File 2156
Edit Download
📁 post-date Folder -
📄 post-date.php File 3124
Edit Download
📁 post-excerpt Folder -
📄 post-excerpt.php File 3447
Edit Download
📁 post-featured-image Folder -
📄 post-featured-image.php File 9363
Edit Download
📁 post-navigation-link Folder -
📄 post-navigation-link.php File 4837
Edit Download
📁 post-template Folder -
📄 post-template.php File 5749
Edit Download
📁 post-terms Folder -
📄 post-terms.php File 3640
Edit Download
📁 post-title Folder -
📄 post-title.php File 2138
Edit Download
📁 preformatted Folder -
📁 pullquote Folder -
📁 query Folder -
📁 query-no-results Folder -
📄 query-no-results.php File 1847
Edit Download
📁 query-pagination Folder -
📁 query-pagination-next Folder -
📄 query-pagination-next.php File 3787
Edit Download
📁 query-pagination-numbers Folder -
📄 query-pagination-numbers.php File 4770
Edit Download
📁 query-pagination-previous Folder -
📄 query-pagination-previous.php File 3584
Edit Download
📄 query-pagination.php File 1176
Edit Download
📁 query-title Folder -
📄 query-title.php File 2098
Edit Download
📁 query-total Folder -
📄 query-total.php File 2535
Edit Download
📄 query.php File 5690
Edit Download
📁 quote Folder -
📁 read-more Folder -
📄 read-more.php File 1830
Edit Download
📄 require-dynamic-blocks.php File 4163
Edit Download
📄 require-static-blocks.php File 501
Edit Download
📁 rss Folder -
📄 rss.php File 4073
Edit Download
📁 search Folder -
📄 search.php File 23016
Edit Download
📁 separator Folder -
📁 shortcode Folder -
📄 shortcode.php File 735
Edit Download
📁 site-logo Folder -
📄 site-logo.php File 6334
Edit Download
📁 site-tagline Folder -
📄 site-tagline.php File 1203
Edit Download
📁 site-title Folder -
📄 site-title.php File 1853
Edit Download
📁 social-link Folder -
📄 social-link.php File 65174
Edit Download
📁 social-links Folder -
📁 spacer Folder -
📁 table Folder -
📁 tag-cloud Folder -
📄 tag-cloud.php File 1590
Edit Download
📁 template-part Folder -
📄 template-part.php File 10154
Edit Download
📁 term-description Folder -
📄 term-description.php File 1336
Edit Download
📁 text-columns Folder -
📁 verse Folder -
📁 video Folder -
📁 widget-group Folder -
📄 widget-group.php File 2438
Edit Download

View File: post-excerpt.php

<?php
/**
 * Server-side rendering of the `core/post-excerpt` block.
 *
 * @package WordPress
 */

/**
 * Renders the `core/post-excerpt` 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 excerpt for the current post wrapped inside "p" tags.
 */
function render_block_core_post_excerpt( $attributes, $content, $block ) {
	if ( ! isset( $block->context['postId'] ) ) {
		return '';
	}

	/*
	* The purpose of the excerpt length setting is to limit the length of both
	* automatically generated and user-created excerpts.
	* Because the excerpt_length filter only applies to auto generated excerpts,
	* wp_trim_words is used instead.
	*/
	$excerpt_length = $attributes['excerptLength'];
	$excerpt        = get_the_excerpt( $block->context['postId'] );
	if ( isset( $excerpt_length ) ) {
		$excerpt = wp_trim_words( $excerpt, $excerpt_length );
	}

	$more_text           = ! empty( $attributes['moreText'] ) ? '<a class="wp-block-post-excerpt__more-link" href="' . esc_url( get_the_permalink( $block->context['postId'] ) ) . '">' . wp_kses_post( $attributes['moreText'] ) . '</a>' : '';
	$filter_excerpt_more = static function ( $more ) use ( $more_text ) {
		return empty( $more_text ) ? $more : '';
	};
	/**
	 * Some themes might use `excerpt_more` filter to handle the
	 * `more` link displayed after a trimmed excerpt. Since the
	 * block has a `more text` attribute we have to check and
	 * override if needed the return value from this filter.
	 * So if the block's attribute is not empty override the
	 * `excerpt_more` filter and return nothing. This will
	 * result in showing only one `read more` link at a time.
	 */
	add_filter( 'excerpt_more', $filter_excerpt_more );
	$classes = array();
	if ( isset( $attributes['textAlign'] ) ) {
		$classes[] = 'has-text-align-' . $attributes['textAlign'];
	}
	if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
		$classes[] = 'has-link-color';
	}
	$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );

	$content               = '<p class="wp-block-post-excerpt__excerpt">' . $excerpt;
	$show_more_on_new_line = ! isset( $attributes['showMoreOnNewLine'] ) || $attributes['showMoreOnNewLine'];
	if ( $show_more_on_new_line && ! empty( $more_text ) ) {
		$content .= '</p><p class="wp-block-post-excerpt__more-text">' . $more_text . '</p>';
	} else {
		$content .= " $more_text</p>";
	}
	remove_filter( 'excerpt_more', $filter_excerpt_more );
	return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes, $content );
}

/**
 * Registers the `core/post-excerpt` block on the server.
 *
 * @since 5.8.0
 */
function register_block_core_post_excerpt() {
	register_block_type_from_metadata(
		__DIR__ . '/post-excerpt',
		array(
			'render_callback' => 'render_block_core_post_excerpt',
		)
	);
}
add_action( 'init', 'register_block_core_post_excerpt' );

/**
 * If themes or plugins filter the excerpt_length, we need to
 * override the filter in the editor, otherwise
 * the excerpt length block setting has no effect.
 * Returns 100 because 100 is the max length in the setting.
 */
if ( is_admin() ||
	defined( 'REST_REQUEST' ) && REST_REQUEST ) {
	add_filter(
		'excerpt_length',
		static function () {
			return 100;
		},
		PHP_INT_MAX
	);
}