wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Add pronouns to user profile page and Person schema output.

Open jdevalk opened this issue 6 months ago • 1 comments

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

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

Test instructions for QA when the code is in the RC

  • [x] QA should use the same steps as above.

UI changes

  • [x] 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

  • [x] I have tested this code to the best of my abilities.
  • [ ] During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • [ ] I have added unit tests to verify the code works as intended.
  • [x] I have checked that the base branch is correctly set.

jdevalk avatar May 20 '25 08:05 jdevalk

Screenshots of this code in action:

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

jdevalk avatar May 20 '25 08:05 jdevalk

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

pls78 avatar Sep 23 '25 12:09 pls78

New PR here.

pls78 avatar Sep 24 '25 09:09 pls78