-
Notifications
You must be signed in to change notification settings - Fork 107
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
micoformats2: avatar leaks into post as "photo" property #301
Comments
I'm interested to know how to fix this in the interim, while we wait for the developer to look into this - I'm currently using Brid.gy to cross-post to Twitter and it's a bit annoying to have my avatar cross-posted as well. |
@vishae I would recommend forking the repo. There are others willing to help maintain the theme. There are a number of issues to be addressed. |
I haven’t tried forking the repo yet, but I guess I should note down my workaround for now, in case anyone is interested. I found and commented out the independent_publisher_mf2_get_avatar_data function in inc/mf2.php, and it seems to work fine now. Then you might want to look into this (https://stackoverflow.com/questions/20473004/how-to-add-automatic-class-in-image-for-wordpress-post) to automatically add a “u-photo” class to images in your post. |
I came to report a conflict with the same function and Gutenberg's Latest Comments block. |
It seems all instances of the avatar have
class="u-photo"
markup declaring them as a photo property. This is useful inside h-cards, but not all instances of the avatar are nested inside one. This causes the avatar to become a property of the post, which isn't right. I'm not really firm with Wordpress themes or PHP, but happy to help with the microformats side of things. My first hunch would be to not attach "u-photo" to the avatar automatically, and instead explicitly add it to the avatars in h-cards.E.g. from the demo page: https://independentpublisher.me/2013/discovering-the-real-nepal/, the mf2 parser output contains
the gravatar 3 times as a photo property:
I investigated this today because it caused issues with @jgmac1106's syndication of a post to Twitter to attach his avatar to the tweet as a picture: https://twitter.com/jgmac1106/status/1022789703261724673
The text was updated successfully, but these errors were encountered: