Skip to content
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

Option to default providers on for all posts #173

Open
snarfed opened this issue Jan 10, 2023 · 12 comments
Open

Option to default providers on for all posts #173

snarfed opened this issue Jan 10, 2023 · 12 comments

Comments

@snarfed
Copy link

snarfed commented Jan 10, 2023

I want to send pretty much all of my posts to Bridgy Fed, so I'm looking for a way to default it to on (checked) for all posts. I especially want this because I use https://wordpress.org/plugins/indieweb-press-this/, and the Synd Links providers don't show up in the Press This UI.

I tried this, but it didn't work:

function always_bridgy_fed( $checked, $uid = null, $post_ID = null ) {
	return ( $uid == 'bridgy-fed' ) ? true : $checked;
}
add_filter('syndication_link_checked', 'always_bridgy_fed');

Thanks in advance!

@dshanske
Copy link
Owner

I will be looking at this.

@dshanske
Copy link
Owner

@snarfed Shouldn't it be:

add_filter('syndication_link_checked', 'always_bridgy_fed', 10, 3);

@snarfed
Copy link
Author

snarfed commented Jan 17, 2023

@dshanske ahhh that did it, thank you!

I'll still hope for official support in the plugin, but still, awesome, glad this workaround works now.

@dshanske
Copy link
Owner

@snarfed I really want to address in a more granular way ala #89

@dshanske
Copy link
Owner

I don't like the idea of it being always for all posts.

@dshanske
Copy link
Owner

There's also this. indieweb/micropub-extensions#23

@dshanske
Copy link
Owner

The checkbox system is based on the Micropub system it integrates into

@snarfed
Copy link
Author

snarfed commented Jan 17, 2023

Alas, the custom filter above works in the standard editor, but not in the Press This editor, probably because the Synd Links UI doesn't show up there, so it doesn't render the checkboxes or run the filter at all. So yeah, I'd definitely like a more built in way to do this. Per category or tag or anything else is fine, as long as it's automatic.

@dshanske
Copy link
Owner

@snarfed Just need to come up with a good idea. As for Press This, I should check the code to see if I can add it in there.

@snarfed
Copy link
Author

snarfed commented Jan 17, 2023

OK! Re Press This, if you do it underneath the UI, ie not specifically dependent on checkboxes or any other specific HTML elements in the editor, then you won't have to worry about Press This, the mobile app, or any of the many other UIs.

For example, say a provider is configured in settings to default to enabled, either always for a given category/tag. When a post is published or updated, if the request explicitly enables or disables that provider (eg in the standard editor), then you obey that. Otherwise, if it doesn't explicitly do either, then you use the default.

@dshanske
Copy link
Owner

Might not be the next release, which will be tying up some loose ends for users.

@snarfed
Copy link
Author

snarfed commented Mar 15, 2023

This is still grating on me every day. Thanks in advance for looking at this eventually!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants