Automattic / newspack-theme

A theme for Newspack.
https://newspack.com
GNU General Public License v2.0
305 stars 64 forks source link

feat: add Bluesky to the profile fields #2413

Closed leogermani closed 4 days ago

leogermani commented 5 days ago

All Submissions:

Changes proposed in this Pull Request:

Adds the Bluesky profile field.

Note. There's also another filter in Yoast that I was trying, that looks like it has to do with it, but I don't see it having any effect, so I removed it. It's this:

add_filter(
'wpseo_person_social_profile_fields',
function( $profile_fields ) {
    if ( ! array_key_exists( 'bluesky', $profile_fields ) ) {
        $profile_fields['bluesky'] = 'get_non_valid_url';
    }
    return $profile_fields;
}
);

How to test the changes in this Pull Request:

  1. Edit an author profie
  2. Confirm you see a new field for Bluesky profile
  3. Add a url starting with https://bsky.app/profile/
  4. Visit the author archive page
  5. Confirm you see the Bluesky link with the correct icon

Other information:

leogermani commented 4 days ago

This isn't working for me. 😕 Doing some light debugging, it looks like the wpseo_additional_contactmethods filter hook isn't getting called on my site. I have Yoast active and a BlueSky profile URL in my author's profile.

If you are seeing the bluesky input in the "edit user" page it means the hook is working fine.

Have you enabled social icons for authors in the theme? It's an option in the theme somewhere. I don't know where you turn this on in the UI (probably in the Customizer), but you can also do so by set_theme_mod( 'show_author_social', true );

laurelfulford commented 4 days ago

I don't know where you turn this on in the UI (probably in the Customizer)

It's under Customizer > Author Bio Settings, "Display Author Social Media links" 🙂

github-actions[bot] commented 4 days ago

Hey @leogermani, good job getting this PR merged! :tada:

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! :heart: