janboddez / share-on-pixelfed

Easily share WordPress image posts on Pixelfed.
https://jan.boddez.net/wordpress/share-on-pixelfed
GNU General Public License v3.0
6 stars 1 forks source link

Restrict by post kinds #22

Open kidwellj opened 3 months ago

kidwellj commented 3 months ago

I'm working with the post kinds plugin (https://wordpress.org/plugins/indieweb-post-kinds/) on an existing fedi facing WordPress instance. Using WordPress as a POSSE platform is terrific, but what I'm wondering is if it's feasible to repost from a single instance to various fedi platforms, say using post type of article to mastodon and post type of image reposted to pixelfed. The current functionality leads me to think it's probably easier just to throw up another separate wp site, but I'm curious about the direction of travel in development on this (very handy!) plugin

janboddez commented 3 months ago

So, what I do is, I use post types rather than post kinds (or post formats), but the idea is very similar.

Of note: I also have sharing set to "opt-in," so I have to explicitly indicate for each post if I want to share to either Mastodon or Pixelfed or both. Or I could do nothing and check neither.

I'm not sure it's possible to, say, completely hide the "share" checkboxes for certain kinds/formats, as those are taxonomies that you'd normally set while creating a post, whereas a post type is something you decide on up front, if that makes sense. (In a way, all post kinds/formats are all ... just posts.)

But what we can do, and I'm relatively sure is already possible through a little bit of custom code, is either stop certain kinds/formats from being shared or force them to be shared.

I'll look into it.

janboddez commented 3 months ago

Also, sharing to Pixelfed will simply be skipped (regardless of the checkbox value) for non-image posts. So, even if you had sharing to both Mastodon and Pixelfed enabled, text-only posts would only ever get shared to Mastodon.

But again, one could definitely halt "photo posts" from being shared on Mastodon. Or non-photo posts that happen to have a (featured) image from being shared on Pixelfed. Even if the checkboxes were (possibly automatically) enabled, or "sharing always" was enabled. But it'd require a tiny bit of extra code. I'll have a look and report back here.