indieweb / wordpress-indieweb

Helps you establish your IndieWeb identity by extending the user profile to provide rel-me and h-card fields. It also includes a bundled installer for a core set of IndieWeb-related plugins.
https://wordpress.org/plugins/indieweb/
MIT License
80 stars 17 forks source link

MF2 image support #71

Open miklb opened 7 years ago

miklb commented 7 years ago

I've had a a to-do to add meta box to the media attachment screen to allow a user to choose whether an image is photo post (u-photo) or featured (u-featured).

I finally found attachment_fields_to_edit so I can move forward with that now.

Question is, should it be in the Microformats 2 plugin, or the IndieWeb plugin? I was thinking IW since not everyone necessarily will have mf2 installed, or the need to if using a mf2 ready theme.

@dshanske made the point that the plugin is designed to play well with themes if they declare support for mf2.

I can see logic for keeping all things mf2 in the MicroFormats 2 plugin, but I'd also like to see as many people get to use the photo option. It's easy to get confused as to how to include an image when POSSEing to Twitter or Facebook.

Do you have any thoughts @pfefferle ?

pfefferle commented 7 years ago

My first intention was, the wp-uf2 plugin. We had a really interesting discussion on a SemPress issue https://github.com/pfefferle/SemPress/issues/51 . Perhaps we should define more granular microformats2 support like add_theme_support( 'microformats2', array( 'author', 'posts', 'featured-image' ) ); to enable only specific parts of the plugin.

In this case, the plugin would be useful even for themes like the independent publisher that is still starting with the implementation of microformats.

If this feature is only interpreted by bird.gy at the moment, @dshanske s bridgy-publish may be an alternative. But as I said, I would prefer the wp-uf2 plugin, because I like the idea and do not use bridgy publish atm: https://github.com/indieweb/wordpress-uf2/issues/29#issuecomment-311148328

miklb commented 7 years ago

u-featured is definitely still considered experimental, however, one could argue with adoption by bird.gy it exposes a much wider audience.

I want to also provide the option to add the u-photo class, as there isn't a way for a user to do that without manually editing the markup (unless using the mf2 plugin & post formats, or post-kinds).

I'm OK adding to wp-uf2 plugin instead of IndieWeb plugin, just want to expand the audience as wide as possible.

pfefferle commented 7 years ago

I am curious!

pfefferle commented 7 years ago

added u-featured to SemPress and ZenPress... thanks for the idea :)

miklb commented 7 years ago

added u-featured to SemPress and ZenPress... thanks for the idea :)

I left a comment on the commit about the distinction of the two classes.

pfefferle commented 7 years ago

oh... that's new to me! thanks for the hint! is there a documentation about that behavior?

miklb commented 7 years ago

oh... that's new to me! thanks for the hint! is there a documentation about that behavior?

Wiki page for Featured

Rest was culled from a conversation with @tantek and I tried to sum it up with a little snippet of code to add the u-featured to WordPress featured image attachments in a blog post