File Manager Lite
Dir:
/home/atomylvb/jarangomd.com/wp-includes/blocks
Upload
[..]
accordion/
Rename
Del
accordion-heading/
Rename
Del
accordion-item/
Rename
Del
accordion-item.php (2.35 KB)
Edit
Rename
Del
accordion-panel/
Rename
Del
accordion.php (1.12 KB)
Edit
Rename
Del
archives/
Rename
Del
archives.php (4.31 KB)
Edit
Rename
Del
audio/
Rename
Del
avatar/
Rename
Del
avatar.php (5.61 KB)
Edit
Rename
Del
block/
Rename
Del
block.php (4.09 KB)
Edit
Rename
Del
blocks-json.php (213.43 KB)
Edit
Rename
Del
button/
Rename
Del
buttons/
Rename
Del
calendar/
Rename
Del
calendar.php (5.93 KB)
Edit
Rename
Del
categories/
Rename
Del
categories.php (4.54 KB)
Edit
Rename
Del
code/
Rename
Del
column/
Rename
Del
columns/
Rename
Del
comment-author-name/
Rename
Del
comment-author-name.php (2.08 KB)
Edit
Rename
Del
comment-content/
Rename
Del
comment-content.php (2.4 KB)
Edit
Rename
Del
comment-date/
Rename
Del
comment-date.php (1.82 KB)
Edit
Rename
Del
comment-edit-link/
Rename
Del
comment-edit-link.php (1.67 KB)
Edit
Rename
Del
comment-reply-link/
Rename
Del
comment-reply-link.php (2.03 KB)
Edit
Rename
Del
comment-template/
Rename
Del
comment-template.php (4.39 KB)
Edit
Rename
Del
comments/
Rename
Del
comments-pagination/
Rename
Del
comments-pagination-next/
Rename
Del
comments-pagination-next.php (1.88 KB)
Edit
Rename
Del
comments-pagination-numbers/
Rename
Del
comments-pagination-numbers.php (1.59 KB)
Edit
Rename
Del
comments-pagination-previous/
Rename
Del
comments-pagination-previous.php (1.75 KB)
Edit
Rename
Del
comments-pagination.php (1.23 KB)
Edit
Rename
Del
comments-title/
Rename
Del
comments-title.php (2.71 KB)
Edit
Rename
Del
cover/
Rename
Del
cover.php (3.1 KB)
Edit
Rename
Del
details/
Rename
Del
embed/
Rename
Del
file/
Rename
Del
file.php (1.83 KB)
Edit
Rename
Del
footnotes/
Rename
Del
footnotes.php (3.68 KB)
Edit
Rename
Del
freeform/
Rename
Del
gallery/
Rename
Del
gallery.php (6.29 KB)
Edit
Rename
Del
group/
Rename
Del
heading/
Rename
Del
heading.php (1.27 KB)
Edit
Rename
Del
home-link/
Rename
Del
home-link.php (5.31 KB)
Edit
Rename
Del
html/
Rename
Del
image/
Rename
Del
image.php (13.5 KB)
Edit
Rename
Del
index.php (4.99 KB)
Edit
Rename
Del
latest-comments/
Rename
Del
latest-comments.php (4.91 KB)
Edit
Rename
Del
latest-posts/
Rename
Del
legacy-widget/
Rename
Del
legacy-widget.php (3.92 KB)
Edit
Rename
Del
list/
Rename
Del
list-item/
Rename
Del
list.php (1.24 KB)
Edit
Rename
Del
loginout/
Rename
Del
loginout.php (1.63 KB)
Edit
Rename
Del
math/
Rename
Del
media-text/
Rename
Del
media-text.php (4.28 KB)
Edit
Rename
Del
missing/
Rename
Del
more/
Rename
Del
navigation/
Rename
Del
navigation-link/
Rename
Del
navigation-link.php (13.63 KB)
Edit
Rename
Del
navigation-submenu/
Rename
Del
navigation-submenu.php (9.74 KB)
Edit
Rename
Del
navigation.php (48.39 KB)
Edit
Rename
Del
nextpage/
Rename
Del
page-list/
Rename
Del
page-list-item/
Rename
Del
page-list-item.php (361 B)
Edit
Rename
Del
page-list.php (13.29 KB)
Edit
Rename
Del
paragraph/
Rename
Del
pattern/
Rename
Del
post-author/
Rename
Del
post-author-biography/
Rename
Del
post-author-biography.php (1.49 KB)
Edit
Rename
Del
post-author-name/
Rename
Del
post-author-name.php (1.91 KB)
Edit
Rename
Del
post-author.php (2.67 KB)
Edit
Rename
Del
post-comments-count/
Rename
Del
post-comments-count.php (1.25 KB)
Edit
Rename
Del
post-comments-form/
Rename
Del
post-comments-form.php (2.74 KB)
Edit
Rename
Del
post-comments-link/
Rename
Del
post-comments-link.php (2.18 KB)
Edit
Rename
Del
post-content/
Rename
Del
post-content.php (2.29 KB)
Edit
Rename
Del
post-date/
Rename
Del
post-date.php (3.55 KB)
Edit
Rename
Del
post-excerpt/
Rename
Del
post-excerpt.php (3.53 KB)
Edit
Rename
Del
post-featured-image/
Rename
Del
post-featured-image.php (9.14 KB)
Edit
Rename
Del
post-navigation-link/
Rename
Del
post-navigation-link.php (4.72 KB)
Edit
Rename
Del
post-template/
Rename
Del
post-template.php (5.61 KB)
Edit
Rename
Del
post-terms/
Rename
Del
post-terms.php (3.55 KB)
Edit
Rename
Del
post-time-to-read/
Rename
Del
post-time-to-read.php (6.34 KB)
Edit
Rename
Del
post-title/
Rename
Del
post-title.php (2.09 KB)
Edit
Rename
Del
preformatted/
Rename
Del
pullquote/
Rename
Del
query/
Rename
Del
query-no-results/
Rename
Del
query-no-results.php (1.8 KB)
Edit
Rename
Del
query-pagination/
Rename
Del
query-pagination-next/
Rename
Del
query-pagination-next.php (3.69 KB)
Edit
Rename
Del
query-pagination-numbers/
Rename
Del
query-pagination-numbers.php (4.66 KB)
Edit
Rename
Del
query-pagination-previous/
Rename
Del
query-pagination-previous.php (3.49 KB)
Edit
Rename
Del
query-pagination.php (1.15 KB)
Edit
Rename
Del
query-title/
Rename
Del
query-title.php (2.87 KB)
Edit
Rename
Del
query-total/
Rename
Del
query-total.php (2.48 KB)
Edit
Rename
Del
query.php (5.56 KB)
Edit
Rename
Del
quote/
Rename
Del
read-more/
Rename
Del
read-more.php (1.79 KB)
Edit
Rename
Del
require-dynamic-blocks.php (4.59 KB)
Edit
Rename
Del
require-static-blocks.php (558 B)
Edit
Rename
Del
rss/
Rename
Del
rss.php (4.5 KB)
Edit
Rename
Del
search/
Rename
Del
search.php (23.26 KB)
Edit
Rename
Del
separator/
Rename
Del
shortcode/
Rename
Del
site-logo/
Rename
Del
site-logo.php (6.19 KB)
Edit
Rename
Del
site-tagline/
Rename
Del
site-tagline.php (1.17 KB)
Edit
Rename
Del
site-title/
Rename
Del
site-title.php (1.82 KB)
Edit
Rename
Del
social-link/
Rename
Del
social-link.php (66.15 KB)
Edit
Rename
Del
social-links/
Rename
Del
spacer/
Rename
Del
table/
Rename
Del
tag-cloud/
Rename
Del
tag-cloud.php (1.55 KB)
Edit
Rename
Del
template-part/
Rename
Del
template-part.php (9.92 KB)
Edit
Rename
Del
term-count/
Rename
Del
term-count.php (1.8 KB)
Edit
Rename
Del
term-description/
Rename
Del
term-description.php (1.73 KB)
Edit
Rename
Del
term-name/
Rename
Del
term-name.php (2.02 KB)
Edit
Rename
Del
term-template/
Rename
Del
term-template.php (4.41 KB)
Edit
Rename
Del
terms-query/
Rename
Del
text-columns/
Rename
Del
verse/
Rename
Del
video/
Rename
Del
video.php (2.67 KB)
Edit
Rename
Del
widget-group/
Rename
Del
widget-group.php (2.38 KB)
Edit
Rename
Del
Edit: query.php
<?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 );
Simpan