All features
Cherry Blossom feature
Structured data Providers: Block Provider base
Provides shared discovery and aggregation for block-backed schema providers.
Provides shared discovery and aggregation for block-backed schema providers.
Capabilities and extension points
Determines whether block data is available for the request.
- param object $context Structured data request context.
- return bool Whether the provider supports the request.
Gets entities from each matching resolved block.
Call only after supports() succeeds. The collector validates each entity.
- param object $context Structured data request context.
- return array Schema entities.
Gets the WordPress block names handled by the provider.
- return string|string[] Fully qualified block names, such as acf/child-faq.
Builds schema entities for one parsed block.
Override in a project provider. Return data matching the Provider contract, without @context or printed markup, using content visible in this block.
- param array $block Parsed WordPress block.
- param object $context Structured data request context.
- return array One entity, a list of entities, or an empty array.
Determines whether the provider supports additional request conditions.
- param object $context Structured data request context.
- return bool Whether the provider supports the context.
Gets valid unique block names declared by the provider.
- return array Block names.
Source reference
This editable reference page is based on the PHP documentation in structured-data/providers/abstract-block-provider.php.