Skip to content

Add pronouns to user profile page and Person schema output.#22286

Merged
pls78 merged 2 commits intoYoast:trunkfrom
jdevalk:jdv/person-pronouns
Sep 23, 2025
Merged

Add pronouns to user profile page and Person schema output.#22286
pls78 merged 2 commits intoYoast:trunkfrom
jdevalk:jdv/person-pronouns

Conversation

@jdevalk
Copy link
Copy Markdown
Contributor

@jdevalk jdevalk commented May 20, 2025

Context

  • In this pull, pronouns was added to Person schema's pending state. This pull implements it for Yoast SEO.

Summary

This PR can be summarized in the following changelog entry:

  • Adds a Pronouns field to the user profile and includes these pronouns in the Schema.org output. Props to jdevalk.

Relevant technical choices:

  • Implemented as a Text value, as Schema.org states:

    We do not intend to enumerate all possible micro-syntaxes in all languages.

  • Implemented both in admin/views/user-profile.php (which seems unused?) and in a new file src/user-meta/framework/custom-meta/author-pronouns.php.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Go to user profile page.
  • Add pronouns.
  • Check Schema Person output and see pronouns reflected in output.

Relevant test scenarios

  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

@jdevalk
Copy link
Copy Markdown
Contributor Author

jdevalk commented May 20, 2025

Screenshots of this code in action:

CleanShot 2025-05-20 at 10 01 24
CleanShot 2025-05-20 at 10 01 12

Comment thread src/generators/schema/person.php Outdated
@enricobattocchi enricobattocchi self-assigned this Jul 14, 2025
@enricobattocchi enricobattocchi added the changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog label Jul 14, 2025
@enricobattocchi enricobattocchi removed their assignment Sep 22, 2025
@pls78 pls78 self-assigned this Sep 22, 2025
@pls78 pls78 added this to the 26.1 milestone Sep 23, 2025
Copy link
Copy Markdown
Member

@pls78 pls78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR && AT: ✅

@pls78 pls78 merged commit 08180d4 into Yoast:trunk Sep 23, 2025
19 of 26 checks passed
@pls78 pls78 modified the milestones: 26.1, 26.2 Sep 23, 2025
@pls78
Copy link
Copy Markdown
Member

pls78 commented Sep 23, 2025

@jdevalk 👋 I reverted the PR because there were a couple of tests failing which prevented the creation of the new RC.
I'll fix this in another PR and give you credits there 🙁
I'll link the PR here in a comment once ready. Thanks!

@enricobattocchi enricobattocchi added changelog: other Needs to be included in the 'Other' category in the changelog changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog and removed changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog changelog: other Needs to be included in the 'Other' category in the changelog labels Sep 23, 2025
@pls78
Copy link
Copy Markdown
Member

pls78 commented Sep 24, 2025

New PR here.

@thijsoo thijsoo added this to the 26.2 milestone Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog community-patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants