Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

jdevalk
Copy link
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:

  • Add a Pronouns field to the user profile and output these pronouns in the Schema.org output.

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
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants