Skip to content

Align Team schema with approved Schema 2.0 mappings #124

Description

@eleshar

Overview

Align the Team extension schema output with the approved Tour Operator Schema 2.0 mappings.

Approved mapping source:
https://docs.google.com/document/d/1UVfrdgR1o2A-5YuyMbY6Bxevy3EXYfOkj-p6dwXFxMA/edit?tab=t.6vo3cqfr9ooz

Current schema file:
https://github.com/lightspeedwp/to-team/blob/develop/classes/class-to-team-schema.php

Delivery Decision

  • Create a new implementation branch from this repository's update-2.2 branch.
  • Keep this issue focused on Team schema only.

Scope

Update LSX_TO_Team_Schema so Team posts emit approved Person schema output.

Tasks

  • Create a new branch from update-2.2 for this work.
  • Update @type from an array to the string Person.
  • Update @id from the non-unique #person hash to a unique person hash, for example #/schema/person/{post_id}.
  • Map post title to name using filtered WordPress title output, not raw $this->post->post_title.
  • Map post content to description after applying the_content filtering and stripping HTML.
  • Keep url and mainEntityOfPage output.
  • Keep worksFor when Yoast site_represents_reference is available.
  • Remove redundant memberOf when it duplicates worksFor.
  • Convert role taxonomy output for jobTitle into a single string or comma-joined string.
  • Keep contact_email mapped to email.
  • Keep contact_number mapped to telephone, preserving international-format values where supplied.
  • Replace semantically incorrect owns output for associated tours/accommodation with additionalProperty values labelled Associated Tours and Associated Accommodation, or another approved non-ownership representation.
  • Add sameAs support for social profile URLs if available in Team fields.
  • Keep image output through the shared/legacy schema utility where appropriate.
  • Add or update tests/manual validation for one populated Team post.

Acceptance Criteria

  • Team posts emit valid Person schema aligned with the approved mapping.
  • @type is a string, not an array.
  • @id is unique per Team post.
  • Title and description use filtered/sanitised WordPress output.
  • worksFor remains, redundant memberOf is removed.
  • jobTitle is emitted as text, not an array of taxonomy terms.
  • Associated tours/accommodation no longer use owns.
  • Schema validates against the agreed structured data QA approach.

Out Of Scope

  • Tour, Accommodation, and Destination schema in the core Tour Operator plugin.
  • Reviews schema updates.
  • Specials schema updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions