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

MF2 image support

Open miklb opened this issue 8 years ago • 7 comments

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 ?

miklb avatar Jun 26 '17 04:06 miklb

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

pfefferle avatar Jun 26 '17 18:06 pfefferle

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.

miklb avatar Jun 26 '17 19:06 miklb

I am curious!

pfefferle avatar Jun 26 '17 19:06 pfefferle

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

pfefferle avatar Jun 26 '17 19:06 pfefferle

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.

miklb avatar Jun 26 '17 19:06 miklb

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

pfefferle avatar Jun 26 '17 19:06 pfefferle

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

miklb avatar Jun 26 '17 19:06 miklb