PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.2
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.2
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / schema-aggregator / domain / external-schema-piece-repository-interface.php

external-schema-piece-repository-interface.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.2, at src/schema-aggregator/domain/external-schema-piece-repository-interface.php

30 lines 896 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3 namespace Yoast\WP\SEO\Schema_Aggregator\Domain;
4
5 /**
6 * Interface for external schema piece repositories.
7 *
8 * Implementations provide schema pieces from external sources (e.g., WooCommerce, EDD).
9 */
10 interface External_Schema_Piece_Repository_Interface {
11
12 /**
13 * Checks if this repository supports the given post type.
14 *
15 * @param string $post_type The post type to check.
16 *
17 * @return bool True if this repository can provide schema for the post type.
18 */
19 public function supports( string $post_type ): bool;
20
21 /**
22 * Collects external schema pieces for the given post.
23 *
24 * @param int $post_id The post ID.
25 *
26 * @return array<array<string,string|int|bool|array>> The schema pieces (always an array, may be empty).
27 */
28 public function collect( int $post_id ): array;
29 }
30