Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
helpers
/
File Content:
pagination-helper.php
<?php namespace Yoast\WP\SEO\Helpers; use Yoast\WP\SEO\Wrappers\WP_Query_Wrapper; use Yoast\WP\SEO\Wrappers\WP_Rewrite_Wrapper; /** * A helper object for pagination. * * Used for the canonical URL and the rel "next" and "prev" meta tags. */ class Pagination_Helper { /** * Holds the WP rewrite wrapper instance. * * @var WP_Rewrite_Wrapper WP_Rewrite wrapper. */ protected $wp_rewrite_wrapper; /** * Holds the WP query wrapper instance. * * @var WP_Query_Wrapper WP_Query wrapper. */ protected $wp_query_wrapper; /** * Pagination_Helper constructor. * * @param WP_Rewrite_Wrapper $wp_rewrite_wrapper The rewrite wrapper. * @param WP_Query_Wrapper $wp_query_wrapper The query wrapper. */ public function __construct( WP_Rewrite_Wrapper $wp_rewrite_wrapper, WP_Query_Wrapper $wp_query_wrapper ) { $this->wp_rewrite_wrapper = $wp_rewrite_wrapper; $this->wp_query_wrapper = $wp_query_wrapper; } /** * Checks whether adjacent rel links are disabled. * * @return bool Whether adjacent rel links are disabled or not. */ public function is_rel_adjacent_disabled() { /** * Filter: 'wpseo_disable_adjacent_rel_links' - Allows disabling of Yoast adjacent links if this is being handled by other code. * * @api bool $links_generated Indicates if other code has handled adjacent links. */ return \apply_filters( 'wpseo_disable_adjacent_rel_links', false ); } /** * Builds a paginated URL. * * @param string $url The un-paginated URL of the current archive. * @param string $page The page number to add on to $url for the $link tag. * @param bool $add_pagination_base Optional. Whether to add the pagination base (`page`) to the url. * @param string $pagination_query_name Optional. The name of the query argument that holds the current page. * * @return string The paginated URL. */ public function get_paginated_url( $url, $page, $add_pagination_base = true, $pagination_query_name = 'page' ) { $wp_rewrite = $this->wp_rewrite_wrapper->get(); if ( $wp_rewrite->using_permalinks() ) { $url = \trailingslashit( $url ); if ( $add_pagination_base ) { $url .= \trailingslashit( $wp_rewrite->pagination_base ); } return \user_trailingslashit( $url . $page ); } return \add_query_arg( $pagination_query_name, $page, \user_trailingslashit( $url ) ); } /** * Gets the number of archive pages. * * @return int The number of archive pages. */ public function get_number_of_archive_pages() { $wp_query = $this->wp_query_wrapper->get_query(); return (int) $wp_query->max_num_pages; } /** * Returns the current page for paged archives. * * @return int The current archive page. */ public function get_current_archive_page_number() { $wp_query = $this->wp_query_wrapper->get_main_query(); return (int) $wp_query->get( 'paged' ); } /** * Returns the current page for paged post types. * * @return int The current post page. */ public function get_current_post_page_number() { $wp_query = $this->wp_query_wrapper->get_main_query(); return (int) $wp_query->get( 'page' ); } /** * Returns the current page number. * * @return int The current page number. */ public function get_current_page_number() { // Get the page number for an archive page. $page_number = \get_query_var( 'paged', 1 ); if ( $page_number > 1 ) { return $page_number; } // Get the page number for a page in a paginated post. return \get_query_var( 'page', 1 ); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
open-graph
---
0755
schema
---
0755
twitter
---
0755
.DS_Store
10234 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
asset-helper.php
2569 bytes
0644
author-archive-helper.php
3531 bytes
0644
bing-presenter.php
638 bytes
0644
blocks-helper.php
2317 bytes
0644
class-metabox-formatter-20260707044405.php
12602 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin-20260707122142.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-tracking-server-data.php
1989 bytes
0644
class-wpseo-replacement-variable.php
1375 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.pack.database.php
30838 bytes
0644
ctrl.package.php
17073 bytes
0644
current-page-helper.php
12153 bytes
0644
date-helper.php
2846 bytes
0644
define.php
4567 bytes
0644
description-presenter-20260623011438.php
1026 bytes
0644
duplicator-20260704004435.php
1781 bytes
0644
duplicator-en_US.mo
582 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260706090318.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623171315.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
environment-helper.php
596 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget.php
11167 bytes
0644
get-request-conditional.php
466 bytes
0644
home-url-helper.php
770 bytes
0644
image-helper.php
10231 bytes
0644
inc.data.php
5121 bytes
0644
inc.validator.php
5401 bytes
0644
index-20260705034705.php
38 bytes
0644
index.php
157663 bytes
0644
indexable-helper.php
4687 bytes
0644
indexing-helper.php
8009 bytes
0644
language-helper.php
1801 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
meta-helper.php
2613 bytes
0644
module.php
1297 bytes
0644
notification-helper.php
546 bytes
0644
options-helper.php
3022 bytes
0644
pagination-helper.php
3557 bytes
0644
post-helper.php
4819 bytes
0644
post-type-helper.php
3521 bytes
0644
primary-term-helper.php
1399 bytes
0644
product-helper.php
659 bytes
0644
quick-edit-handler-1650-20260707073901.js
1848 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
recovery.php
1146 bytes
0644
redirect-helper.php
1458 bytes
0644
request-helper.php
352 bytes
0644
require-file-helper.php
305 bytes
0644
robots-helper.php
526 bytes
0644
root.php
1951 bytes
0644
short-link-helper.php
3375 bytes
0644
site-helper.php
566 bytes
0644
social.php
725 bytes
0644
taxonomy-helper.php
3109 bytes
0644
uninstall.php
4401 bytes
0644
url-helper.php
4729 bytes
0644
user-helper.php
3763 bytes
0644
woocommerce-helper.php
879 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-es_CR.json
14212 bytes
0644
wordpress-seojs-es_ES.json
20568 bytes
0644
wordpress-seojs-gl_ES-20260704065626.json
20143 bytes
0644
wordpress-seojs-gl_ES.json
20143 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
wp-query-wrapper.php
834 bytes
0644
N4ST4R_ID | Naxtarrr