Priority File Manager
📁 public_html
Base Directory:
/home/ecedu/public_html
/home/ecedu/public_html/wp-content/plugins
/home/ecedu/public_html/wp-content
/home/ecedu
/var/www
/var/www/cgi-bin
/var/www/html
public_html
/
wp-includes
/
blocks
/home/ecedu/public_html/wp-includes/blocks
Name
Type
Size
Actions
📁
..
Folder
-
Delete
Rename
📁
archives
Folder
-
Delete
Rename
📄
archives.php
File
2994
Delete
Rename
Edit
Download
📁
audio
Folder
-
Delete
Rename
📁
avatar
Folder
-
Delete
Rename
📄
avatar.php
File
5745
Delete
Rename
Edit
Download
📁
block
Folder
-
Delete
Rename
📄
block.php
File
3314
Delete
Rename
Edit
Download
📄
blocks-json.php
File
193945
Delete
Rename
Edit
Download
📁
button
Folder
-
Delete
Rename
📄
button.php
File
1805
Delete
Rename
Edit
Download
📁
buttons
Folder
-
Delete
Rename
📁
calendar
Folder
-
Delete
Rename
📄
calendar.php
File
6075
Delete
Rename
Edit
Download
📁
categories
Folder
-
Delete
Rename
📄
categories.php
File
4010
Delete
Rename
Edit
Download
📁
code
Folder
-
Delete
Rename
📁
column
Folder
-
Delete
Rename
📁
columns
Folder
-
Delete
Rename
📁
comment-author-name
Folder
-
Delete
Rename
📄
comment-author-name.php
File
2133
Delete
Rename
Edit
Download
📁
comment-content
Folder
-
Delete
Rename
📄
comment-content.php
File
2459
Delete
Rename
Edit
Download
📁
comment-date
Folder
-
Delete
Rename
📄
comment-date.php
File
1863
Delete
Rename
Edit
Download
📁
comment-edit-link
Folder
-
Delete
Rename
📄
comment-edit-link.php
File
1713
Delete
Rename
Edit
Download
📁
comment-reply-link
Folder
-
Delete
Rename
📄
comment-reply-link.php
File
2075
Delete
Rename
Edit
Download
📁
comment-template
Folder
-
Delete
Rename
📄
comment-template.php
File
4494
Delete
Rename
Edit
Download
📁
comments
Folder
-
Delete
Rename
📁
comments-pagination
Folder
-
Delete
Rename
📁
comments-pagination-next
Folder
-
Delete
Rename
📄
comments-pagination-next.php
File
1924
Delete
Rename
Edit
Download
📁
comments-pagination-numbers
Folder
-
Delete
Rename
📄
comments-pagination-numbers.php
File
1632
Delete
Rename
Edit
Download
📁
comments-pagination-previous
Folder
-
Delete
Rename
📄
comments-pagination-previous.php
File
1790
Delete
Rename
Edit
Download
📄
comments-pagination.php
File
1199
Delete
Rename
Edit
Download
📁
comments-title
Folder
-
Delete
Rename
📄
comments-title.php
File
2772
Delete
Rename
Edit
Download
📄
comments.php
File
6767
Delete
Rename
Edit
Download
📁
cover
Folder
-
Delete
Rename
📄
cover.php
File
3175
Delete
Rename
Edit
Download
📁
details
Folder
-
Delete
Rename
📁
embed
Folder
-
Delete
Rename
📁
file
Folder
-
Delete
Rename
📄
file.php
File
1793
Delete
Rename
Edit
Download
📁
footnotes
Folder
-
Delete
Rename
📄
footnotes.php
File
3771
Delete
Rename
Edit
Download
📁
freeform
Folder
-
Delete
Rename
📁
gallery
Folder
-
Delete
Rename
📄
gallery.php
File
6438
Delete
Rename
Edit
Download
📁
group
Folder
-
Delete
Rename
📁
heading
Folder
-
Delete
Rename
📄
heading.php
File
1301
Delete
Rename
Edit
Download
📁
home-link
Folder
-
Delete
Rename
📄
home-link.php
File
5438
Delete
Rename
Edit
Download
📁
html
Folder
-
Delete
Rename
📁
image
Folder
-
Delete
Rename
📄
image.php
File
12023
Delete
Rename
Edit
Download
📄
index.php
File
5111
Delete
Rename
Edit
Download
📁
latest-comments
Folder
-
Delete
Rename
📄
latest-comments.php
File
5040
Delete
Rename
Edit
Download
📁
latest-posts
Folder
-
Delete
Rename
📄
latest-posts.php
File
8542
Delete
Rename
Edit
Download
📁
legacy-widget
Folder
-
Delete
Rename
📄
legacy-widget.php
File
3997
Delete
Rename
Edit
Download
📁
list
Folder
-
Delete
Rename
📁
list-item
Folder
-
Delete
Rename
📄
list.php
File
1273
Delete
Rename
Edit
Download
📁
loginout
Folder
-
Delete
Rename
📄
loginout.php
File
1418
Delete
Rename
Edit
Download
📁
media-text
Folder
-
Delete
Rename
📄
media-text.php
File
4383
Delete
Rename
Edit
Download
📁
missing
Folder
-
Delete
Rename
📁
more
Folder
-
Delete
Rename
📁
navigation
Folder
-
Delete
Rename
📁
navigation-link
Folder
-
Delete
Rename
📄
navigation-link.php
File
13913
Delete
Rename
Edit
Download
📁
navigation-submenu
Folder
-
Delete
Rename
📄
navigation-submenu.php
File
9943
Delete
Rename
Edit
Download
📄
navigation.php
File
49620
Delete
Rename
Edit
Download
📁
nextpage
Folder
-
Delete
Rename
📁
page-list
Folder
-
Delete
Rename
📁
page-list-item
Folder
-
Delete
Rename
📄
page-list-item.php
File
361
Delete
Rename
Edit
Download
📄
page-list.php
File
13611
Delete
Rename
Edit
Download
📁
paragraph
Folder
-
Delete
Rename
📁
pattern
Folder
-
Delete
Rename
📄
pattern.php
File
1788
Delete
Rename
Edit
Download
📁
post-author
Folder
-
Delete
Rename
📁
post-author-biography
Folder
-
Delete
Rename
📄
post-author-biography.php
File
1524
Delete
Rename
Edit
Download
📁
post-author-name
Folder
-
Delete
Rename
📄
post-author-name.php
File
1951
Delete
Rename
Edit
Download
📄
post-author.php
File
2734
Delete
Rename
Edit
Download
📁
post-comments-form
Folder
-
Delete
Rename
📄
post-comments-form.php
File
2805
Delete
Rename
Edit
Download
📁
post-content
Folder
-
Delete
Rename
📄
post-content.php
File
2156
Delete
Rename
Edit
Download
📁
post-date
Folder
-
Delete
Rename
📄
post-date.php
File
3124
Delete
Rename
Edit
Download
📁
post-excerpt
Folder
-
Delete
Rename
📄
post-excerpt.php
File
3447
Delete
Rename
Edit
Download
📁
post-featured-image
Folder
-
Delete
Rename
📄
post-featured-image.php
File
9363
Delete
Rename
Edit
Download
📁
post-navigation-link
Folder
-
Delete
Rename
📄
post-navigation-link.php
File
4837
Delete
Rename
Edit
Download
📁
post-template
Folder
-
Delete
Rename
📄
post-template.php
File
5749
Delete
Rename
Edit
Download
📁
post-terms
Folder
-
Delete
Rename
📄
post-terms.php
File
3640
Delete
Rename
Edit
Download
📁
post-title
Folder
-
Delete
Rename
📄
post-title.php
File
2138
Delete
Rename
Edit
Download
📁
preformatted
Folder
-
Delete
Rename
📁
pullquote
Folder
-
Delete
Rename
📁
query
Folder
-
Delete
Rename
📁
query-no-results
Folder
-
Delete
Rename
📄
query-no-results.php
File
1847
Delete
Rename
Edit
Download
📁
query-pagination
Folder
-
Delete
Rename
📁
query-pagination-next
Folder
-
Delete
Rename
📄
query-pagination-next.php
File
3787
Delete
Rename
Edit
Download
📁
query-pagination-numbers
Folder
-
Delete
Rename
📄
query-pagination-numbers.php
File
4770
Delete
Rename
Edit
Download
📁
query-pagination-previous
Folder
-
Delete
Rename
📄
query-pagination-previous.php
File
3584
Delete
Rename
Edit
Download
📄
query-pagination.php
File
1176
Delete
Rename
Edit
Download
📁
query-title
Folder
-
Delete
Rename
📄
query-title.php
File
2098
Delete
Rename
Edit
Download
📁
query-total
Folder
-
Delete
Rename
📄
query-total.php
File
2535
Delete
Rename
Edit
Download
📄
query.php
File
5690
Delete
Rename
Edit
Download
📁
quote
Folder
-
Delete
Rename
📁
read-more
Folder
-
Delete
Rename
📄
read-more.php
File
1830
Delete
Rename
Edit
Download
📄
require-dynamic-blocks.php
File
4163
Delete
Rename
Edit
Download
📄
require-static-blocks.php
File
501
Delete
Rename
Edit
Download
📁
rss
Folder
-
Delete
Rename
📄
rss.php
File
4073
Delete
Rename
Edit
Download
📁
search
Folder
-
Delete
Rename
📄
search.php
File
23016
Delete
Rename
Edit
Download
📁
separator
Folder
-
Delete
Rename
📁
shortcode
Folder
-
Delete
Rename
📄
shortcode.php
File
735
Delete
Rename
Edit
Download
📁
site-logo
Folder
-
Delete
Rename
📄
site-logo.php
File
6334
Delete
Rename
Edit
Download
📁
site-tagline
Folder
-
Delete
Rename
📄
site-tagline.php
File
1203
Delete
Rename
Edit
Download
📁
site-title
Folder
-
Delete
Rename
📄
site-title.php
File
1853
Delete
Rename
Edit
Download
📁
social-link
Folder
-
Delete
Rename
📄
social-link.php
File
65174
Delete
Rename
Edit
Download
📁
social-links
Folder
-
Delete
Rename
📁
spacer
Folder
-
Delete
Rename
📁
table
Folder
-
Delete
Rename
📁
tag-cloud
Folder
-
Delete
Rename
📄
tag-cloud.php
File
1590
Delete
Rename
Edit
Download
📁
template-part
Folder
-
Delete
Rename
📄
template-part.php
File
10154
Delete
Rename
Edit
Download
📁
term-description
Folder
-
Delete
Rename
📄
term-description.php
File
1336
Delete
Rename
Edit
Download
📁
text-columns
Folder
-
Delete
Rename
📁
verse
Folder
-
Delete
Rename
📁
video
Folder
-
Delete
Rename
📁
widget-group
Folder
-
Delete
Rename
📄
widget-group.php
File
2438
Delete
Rename
Edit
Download
Upload
Create Folder
📝 Editing:
comment-template.php
Size: 4,494 bytes
Lines: 154
Type: .php
💾 Save
Cancel
✕
<?php /** * Server-side rendering of the `core/comment-template` block. * * @package WordPress */ /** * Function that recursively renders a list of nested comments. * * @since 6.3.0 Changed render_block_context priority to `1`. * * @global int $comment_depth * * @param WP_Comment[] $comments The array of comments. * @param WP_Block $block Block instance. * @return string */ function block_core_comment_template_render_comments( $comments, $block ) { global $comment_depth; $thread_comments = get_option( 'thread_comments' ); $thread_comments_depth = get_option( 'thread_comments_depth' ); if ( empty( $comment_depth ) ) { $comment_depth = 1; } $content = ''; foreach ( $comments as $comment ) { $comment_id = $comment->comment_ID; $filter_block_context = static function ( $context ) use ( $comment_id ) { $context['commentId'] = $comment_id; return $context; }; /* * We set commentId context through the `render_block_context` filter so * that dynamically inserted blocks (at `render_block` filter stage) * will also receive that context. * * Use an early priority to so that other 'render_block_context' filters * have access to the values. */ add_filter( 'render_block_context', $filter_block_context, 1 ); /* * We construct a new WP_Block instance from the parsed block so that * it'll receive any changes made by the `render_block_data` filter. */ $block_content = ( new WP_Block( $block->parsed_block ) )->render( array( 'dynamic' => false ) ); remove_filter( 'render_block_context', $filter_block_context, 1 ); $children = $comment->get_children(); /* * We need to create the CSS classes BEFORE recursing into the children. * This is because comment_class() uses globals like `$comment_alt` * and `$comment_thread_alt` which are order-sensitive. * * The `false` parameter at the end means that we do NOT want the function * to `echo` the output but to return a string. * See https://developer.wordpress.org/reference/functions/comment_class/#parameters. */ $comment_classes = comment_class( '', $comment->comment_ID, $comment->comment_post_ID, false ); // If the comment has children, recurse to create the HTML for the nested // comments. if ( ! empty( $children ) && ! empty( $thread_comments ) ) { if ( $comment_depth < $thread_comments_depth ) { ++$comment_depth; $inner_content = block_core_comment_template_render_comments( $children, $block ); $block_content .= sprintf( '<ol>%1$s</ol>', $inner_content ); --$comment_depth; } else { $block_content .= block_core_comment_template_render_comments( $children, $block ); } } $content .= sprintf( '<li id="comment-%1$s" %2$s>%3$s</li>', $comment->comment_ID, $comment_classes, $block_content ); } return $content; } /** * Renders the `core/comment-template` block on the server. * * @since 6.0.0 * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. * * @return string Returns the HTML representing the comments using the layout * defined by the block's inner blocks. */ function render_block_core_comment_template( $attributes, $content, $block ) { // Bail out early if the post ID is not set for some reason. if ( empty( $block->context['postId'] ) ) { return ''; } if ( post_password_required( $block->context['postId'] ) ) { return; } $comment_query = new WP_Comment_Query( build_comment_query_vars_from_block( $block ) ); // Get an array of comments for the current post. $comments = $comment_query->get_comments(); if ( count( $comments ) === 0 ) { return ''; } $comment_order = get_option( 'comment_order' ); if ( 'desc' === $comment_order ) { $comments = array_reverse( $comments ); } $wrapper_attributes = get_block_wrapper_attributes(); return sprintf( '<ol %1$s>%2$s</ol>', $wrapper_attributes, block_core_comment_template_render_comments( $comments, $block ) ); } /** * Registers the `core/comment-template` block on the server. * * @since 6.0.0 */ function register_block_core_comment_template() { register_block_type_from_metadata( __DIR__ . '/comment-template', array( 'render_callback' => 'render_block_core_comment_template', 'skip_inner_blocks' => true, ) ); } add_action( 'init', 'register_block_core_comment_template' );
✅ File saved successfully!