I may have got it working, using the Webmention plugin and a couple filters.

Publishing a custom post type doesn’t automatically send anything, for me. I have to manually call `Webmention_Sender::send_webmentions()`. Also, because I often rely on Mastodon or Twitter to autolink URLs, I had to use the `webmention_links` filter and run `make_clickable()` on some posts first, for the plugin to detect any targets.

Show thread

Why would I want to do all that? Well, because I might be able to retire my own, dead-simple “Webmention Comments” plugin.

Show thread

Fun fact: I did programmatically declare support for `webmentions` ...

Show thread

Receiving webmentions doesn't work either, for my setup. (`webmention_url_to_postid` does not return the proper post ID.) Might revert to my own plugin, then.

Show thread

Although ... `webmention_url_to_postid` _is_ filterable.

Show thread

Seems WP's own `url_to_postid()` somehow returns 0 for any and all of my statuses. Probably due to my somewhat bizarre setup. Seems to work alright, though, with a quickly thrown together filter in place.

Show thread

Which means @pfefferle's Webmention plugin works even for total edge cases like mine.

Show thread

One thing I'd like to do, still, is replace Bridgy's URL with the actual source. Which would require filtering `webmention_comment_data` and parse the source's microformats ... (Although I've also installed Semantic Linkbacks, it doesn't seem to cover that part.)

Show thread

Sometimes a _tiny_ plugin that does _exactly_ what you want, is actually quite nice! (The alternative is stacking 3rd-party plugins on top of each other and filtering the heck out of _everything_.)

Show thread

Never mind! The `semantic_linkbacks_canonical` comment meta field contains exactly what I need. (Up next: adapt the front end to include it.)

Show thread

And I think I've just successfully used the `preprocess_comment` filter to _locally_ cache avatars.

Show thread

Not to self: could this be due to my marking posts 'private' when overriding their custom post type properties?

Show thread
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!