X7ROOT File Manager
Current Path:
/home/u126090504/domains/tncm.org.in/public_html/wp-includes/blocks
home
/
u126090504
/
domains
/
tncm.org.in
/
public_html
/
wp-includes
/
blocks
/
📁
..
📁
accordion
📁
accordion-heading
📁
accordion-item
📄
accordion-item.php
(2.97 KB)
📁
accordion-panel
📄
accordion.php
(1.12 KB)
📁
archives
📄
archives.php
(4.28 KB)
📁
audio
📁
avatar
📄
avatar.php
(5.5 KB)
📁
block
📄
block.php
(4.09 KB)
📄
blocks-json.php
(194.46 KB)
📁
breadcrumbs
📄
breadcrumbs.php
(18.61 KB)
📁
button
📄
button.php
(1.71 KB)
📁
buttons
📁
calendar
📄
calendar.php
(5.93 KB)
📁
categories
📄
categories.php
(4.82 KB)
📁
code
📁
column
📁
columns
📁
comment-author-name
📄
comment-author-name.php
(2.08 KB)
📁
comment-content
📄
comment-content.php
(2.4 KB)
📁
comment-date
📄
comment-date.php
(1.82 KB)
📁
comment-edit-link
📄
comment-edit-link.php
(1.67 KB)
📁
comment-reply-link
📄
comment-reply-link.php
(2.03 KB)
📁
comment-template
📄
comment-template.php
(4.39 KB)
📁
comments
📁
comments-pagination
📁
comments-pagination-next
📄
comments-pagination-next.php
(1.88 KB)
📁
comments-pagination-numbers
📄
comments-pagination-numbers.php
(1.59 KB)
📁
comments-pagination-previous
📄
comments-pagination-previous.php
(1.75 KB)
📄
comments-pagination.php
(1.23 KB)
📁
comments-title
📄
comments-title.php
(2.72 KB)
📄
comments.php
(6.63 KB)
📁
cover
📄
cover.php
(7.25 KB)
📁
details
📄
details.php
(1.46 KB)
📁
embed
📁
file
📄
file.php
(1.83 KB)
📁
footnotes
📄
footnotes.php
(3.73 KB)
📁
freeform
📁
gallery
📄
gallery.php
(8.85 KB)
📁
group
📁
heading
📄
heading.php
(1.27 KB)
📁
home-link
📄
home-link.php
(5.31 KB)
📁
html
📁
icon
📄
icon.php
(4.04 KB)
📁
image
📄
image.php
(17.25 KB)
📄
index.php
(4.99 KB)
📁
latest-comments
📄
latest-comments.php
(5.36 KB)
📁
latest-posts
📄
latest-posts.php
(8.64 KB)
📁
legacy-widget
📄
legacy-widget.php
(3.92 KB)
📁
list
📁
list-item
📄
list.php
(1.24 KB)
📁
loginout
📄
loginout.php
(1.63 KB)
📁
math
📁
media-text
📄
media-text.php
(4.2 KB)
📁
missing
📁
more
📁
navigation
📁
navigation-link
📄
navigation-link.php
(15.84 KB)
📁
navigation-overlay-close
📄
navigation-overlay-close.php
(1.72 KB)
📁
navigation-submenu
📄
navigation-submenu.php
(11.47 KB)
📄
navigation.php
(63.3 KB)
📁
nextpage
📁
page-list
📁
page-list-item
📄
page-list-item.php
(361 B)
📄
page-list.php
(14.72 KB)
📁
paragraph
📄
paragraph.php
(1.11 KB)
📁
pattern
📄
pattern.php
(1.75 KB)
📁
post-author
📁
post-author-biography
📄
post-author-biography.php
(1.49 KB)
📁
post-author-name
📄
post-author-name.php
(1.91 KB)
📄
post-author.php
(2.67 KB)
📁
post-comments-count
📄
post-comments-count.php
(1.25 KB)
📁
post-comments-form
📄
post-comments-form.php
(2.74 KB)
📁
post-comments-link
📄
post-comments-link.php
(2.18 KB)
📁
post-content
📄
post-content.php
(2.29 KB)
📁
post-date
📄
post-date.php
(3.57 KB)
📁
post-excerpt
📄
post-excerpt.php
(4.21 KB)
📁
post-featured-image
📄
post-featured-image.php
(9.03 KB)
📁
post-navigation-link
📄
post-navigation-link.php
(4.69 KB)
📁
post-template
📄
post-template.php
(5.55 KB)
📁
post-terms
📄
post-terms.php
(3.55 KB)
📁
post-time-to-read
📄
post-time-to-read.php
(6.26 KB)
📁
post-title
📄
post-title.php
(2.09 KB)
📁
preformatted
📁
pullquote
📁
query
📁
query-no-results
📄
query-no-results.php
(1.8 KB)
📁
query-pagination
📁
query-pagination-next
📄
query-pagination-next.php
(3.59 KB)
📁
query-pagination-numbers
📄
query-pagination-numbers.php
(4.59 KB)
📁
query-pagination-previous
📄
query-pagination-previous.php
(3.39 KB)
📄
query-pagination.php
(1.15 KB)
📁
query-title
📄
query-title.php
(2.71 KB)
📁
query-total
📄
query-total.php
(2.41 KB)
📄
query.php
(5.56 KB)
📁
quote
📁
read-more
📄
read-more.php
(1.79 KB)
📄
require-dynamic-blocks.php
(4.86 KB)
📄
require-static-blocks.php
(520 B)
📁
rss
📄
rss.php
(4.5 KB)
📁
search
📄
search.php
(23.26 KB)
📁
separator
📁
shortcode
📄
shortcode.php
(735 B)
📁
site-logo
📄
site-logo.php
(6.19 KB)
📁
site-tagline
📄
site-tagline.php
(1.17 KB)
📁
site-title
📄
site-title.php
(1.82 KB)
📁
social-link
📄
social-link.php
(66.02 KB)
📁
social-links
📁
spacer
📁
table
📁
tag-cloud
📄
tag-cloud.php
(1.55 KB)
📁
template-part
📄
template-part.php
(10.2 KB)
📁
term-count
📄
term-count.php
(1.8 KB)
📁
term-description
📄
term-description.php
(1.73 KB)
📁
term-name
📄
term-name.php
(1.99 KB)
📁
term-template
📄
term-template.php
(4.41 KB)
📁
terms-query
📁
text-columns
📁
verse
📁
video
📄
video.php
(2.67 KB)
📁
widget-group
📄
widget-group.php
(2.38 KB)
Editing: 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 ''; } $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. * * This hook needs to be applied before the excerpt is retrieved with get_the_excerpt. * Otherwise, the read more link filter from the theme is not removed. */ add_filter( 'excerpt_more', $filter_excerpt_more ); /* * 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. * * To ensure the block's excerptLength setting works correctly for auto-generated * excerpts, we temporarily override excerpt_length to 101 (the max block setting) * so that wp_trim_excerpt doesn't pre-trim the content before wp_trim_words can * apply the user's desired length. */ $excerpt_length = $attributes['excerptLength']; add_filter( 'excerpt_length', 'block_core_post_excerpt_excerpt_length', PHP_INT_MAX ); $excerpt = get_the_excerpt( $block->context['postId'] ); remove_filter( 'excerpt_length', 'block_core_post_excerpt_excerpt_length', PHP_INT_MAX ); if ( isset( $excerpt_length ) ) { $excerpt = wp_trim_words( $excerpt, $excerpt_length ); } $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' ); /** * Callback for the excerpt_length filter to override the excerpt length. * * 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 101 (one more than the max block setting of 100) to ensure * wp_trim_words can detect when trimming is needed and add the ellipsis. * * @since 7.0.0 * * @return int The excerpt length. */ function block_core_post_excerpt_excerpt_length() { return 101; } if ( is_admin() ) { add_filter( 'excerpt_length', 'block_core_post_excerpt_excerpt_length', PHP_INT_MAX ); }
Upload File
Create Folder