dshanske / syndication-links

Add and Display Syndication Links in WordPress
https://wordpress.org/plugins/syndication-links/
GNU General Public License v2.0
30 stars 13 forks source link

Saving draft shouldn't trigger syndication #185

Closed snarfed closed 1 year ago

snarfed commented 1 year ago

Surprisingly, when you click the Save draft link at the top of the WordPress editor, this plugin triggers syndication to all of the enabled providers. That should only happen when you publish or update a post, not when you save it as a draft.

dshanske commented 1 year ago

It shouldn't. I'm positive I stopped that. I'm going to have to study this.

snarfed commented 1 year ago

OK! Low priority, I'd vote for others like https://github.com/indieweb/wordpress-micropub/issues/283 before this.

If it helps, I'm on WP 6.2.2, SL plugin 4.4.11. (And WM plugin 4.0.9 and Semantic Linkbacks 3.12.0, but I assume those don't matter here.)

snarfed commented 1 year ago

Also, in case it helps, I don't think I see this happen when it auto-saves drafts, only when I manually click on the Save draft link.

dshanske commented 1 year ago

When you save the post, it adds a key to the post, similar to the pingback functionality. when it runs that...it actually filters for publish.

$syndicate = get_posts( array( 'meta_key' => '_syndicate-to', 'fields' => 'ids', 'nopaging' => true, 'post_status' => 'publish', ) );

But if you disable the scheduling, it publishes immediately...except it does that without regard for the post_status. Should be fixed now.

snarfed commented 1 year ago

woo thank you!