All features

Cherry Blossom feature

Theme framework: Structured Data

Coordinates structured data providers and output adapters.

Coordinates structured data providers and output adapters.

Capabilities and extension points

Structured data collector.

  • var Collector

Schema graph merger.

  • var Merger

Rank Math graph fallback adapter.

  • var Fallbacks

Rank Math settings synchronizer.

  • var Settings_Sync

Current request context.

  • var Context|null

Whether Rank Math invoked the graph adapter.

  • var bool

Initializes structured data support.

Registers structured data hooks.

Adds providers linked by the current singular post type definition.

  • param mixed $providers Registered structured data providers.
  • param object $structured_data Structured data module instance.
  • return mixed Extended provider list.

Merges theme entities into Rank Math's schema graph.

Branding and social/address fallbacks are applied first. Without additional provider entities, that fallback-enriched graph is returned without merging.

  • param mixed $data Rank Math schema graph.
  • param mixed $json_ld Rank Math JSON-LD instance.
  • return array Merged schema graph.

Outputs a theme-owned graph when Rank Math did not handle the request.

Gets collected entities for the current request.

  • return array Structured data entities.

Gets the current request context.

The first context is cached. Call after the main query has been resolved.

  • return Context Structured data context.

Determines whether fallback output belongs in the response.

  • return bool Whether fallback output is allowed.

Source reference

This editable reference page is based on the PHP documentation in class-structured-data.php.