✘✘ 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.217.7
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/envhttps/inlite/application/meta//response-meta-provider.php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Schema_Aggregator\Application\Meta;

use Yoast\WP\SEO\Schema_Aggregator\Application\Schema_Map\Schema_Map_Builder;
use Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Schema_Map\Schema_Map_Indexable_Repository;

/**
 * Provides metadata for API responses.
 *
 * @codeCoverageIgnore -- Currently not used.
 */
class Response_Meta_Provider {

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

	/**
	 * The schema map builder.
	 *
	 * @var Schema_Map_Builder
	 */
	private $schema_map_builder;

	/**
	 * Response_Meta_Provider constructor.
	 *
	 * @param Schema_Map_Indexable_Repository $schema_map_repository The schema map indexable repository.
	 * @param Schema_Map_Builder              $schema_map_builder    The schema map builder.
	 */
	public function __construct( Schema_Map_Indexable_Repository $schema_map_repository, Schema_Map_Builder $schema_map_builder ) {
		$this->schema_map_repository = $schema_map_repository;
		$this->schema_map_builder    = $schema_map_builder;
	}

	/**
	 * Build metadata structure for API response
	 *
	 * @param string $post_type The post type being queried.
	 * @param int    $page      The page number (1-based).
	 * @param int    $page_size The number of items per page.
	 *
	 * @return array<string,array<string>> Metadata structure.
	 */
	public function get_metadata( string $post_type, int $page, int $page_size ): array {
		$metadata = [
			'generator'    => [
				'name'    => 'Yoast NLWeb Integration',
				'version' => \WPSEO_VERSION,
				'vendor'  => 'Yoast',
				'url'     => 'https://yoast.com',
			],
			'dependencies' => [
				'wordpress' => \function_exists( 'get_bloginfo' ) ? \get_bloginfo( 'version' ) : 'unknown',
				'yoast_seo' => \WPSEO_VERSION,
			],
			'generated_at' => \gmdate( 'Y-m-d\TH:i:s\Z' ),
		];

		if ( \defined( 'WPSEO_WOO_VERSION' ) ) {
			$metadata['dependencies']['yoast_seo_woocommerce'] = \WPSEO_WOO_VERSION;
		}

		return $this->maybe_add_pagination_metadata( $metadata, $post_type, $page, $page_size );
	}

	/**
	 * Add pagination metadata to the response if applicable.
	 *
	 * @param array<string,array<string>> $metadata  The metadata array to add pagination info to.
	 * @param string                      $post_type The post type being queried.
	 * @param int                         $page      The current page number (1-based).
	 * @param int                         $page_size The number of items per page.
	 *
	 * @return array<string,array<string>> The updated metadata array.
	 */
	private function maybe_add_pagination_metadata(
		array $metadata,
		string $post_type,
		int $page,
		int $page_size
	): array {

		$indexable_count = $this->schema_map_repository->get_indexable_count_for_post_type( $post_type );
		$total_items     = $indexable_count->get_count();

		if ( $total_items === 0 ) {
			return $metadata;
		}

		$total_pages = (int) \ceil( $total_items / $page_size );

		if ( $page < $total_pages ) {
			$next_page_url    = $this->schema_map_builder->get_rest_route( $post_type, ( $page + 1 ) );
			$metadata['next'] = $next_page_url;

		}
		return $metadata;
	}
}


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


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
19 Sep 2026 8.40 AM
docteuh / users
0755
class-fusion-dynamic-data.php
78.321 KB
20 Nov 2023 7.14 PM
docteuh / users
0644
response-meta-provider.php
3.198 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

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