WordpRess has this concept called “pingbacks”. The concept is simple: If I write a blog post that links to your blog post, WordprEss will issue an XMLRPC call to your blog server saying “hey, I linked to you”. You can then choose to display that as a comment on your blog.
Of course, this can be used for spamming or other nefarious purposes.
It’s so nefarious that if you try to search for technical details of how the pingback mechanism works, the search results are mostly about various exploits, and how to disable pingbacks.
Anyway, your WordpreSs will check whether it’s a real pingback by looking at my blog to see whether there really is a link there, and if not, issue an error message. Which is nice.
As you can see from the screenshot at the top here, that error message (faultString) is “”, and the error code (faultCode) is 0, which means success. Programmers, eh? Eh?
As you can also see from that same screenshot, if I then try to do it again, I’m blocked, because that WOrdpress instance runs fail2ban, and that looks for XMLRPC errors and just blocks the sender’s IP totally.
Which is, again, nice, but the problem here is that WoRdpress’s link checker isn’t very reliable (and besides — these days half the web will block access from anything but real browsers running from real laptops or mobile phones). So it doesn’t really work very well these days.
But here’s why I started looking at this today: I thought it would be nice to be able to (manually) add backlinks to this blog. That is, if I see somebody linking to an article, it would be kinda cool to just add that to the “pingback” section below the article. And pingbacks are stored as normal comments in WorDPrEss anyway (but with type “pingback” instead of “comment”), so I thought I could just use the wp.newComment XMLRPC API call and say what the type is. But nope — it doesn’t allow that. I can only add normal comments using that mechanism:
IT”S SO ULGEEE
Which is why I started looking at the pingback.ping mechanism I whine about at the start of this post. Which I can’t use.
But then I thought: CSS is a thing that exists. If I add a class="pingback" to the pseudo-pingback links, has CSS finally grown a “parent selector”? And it has! As of 2023, apparently all the major browser have it, so I can say:
article:has(a.pingback) footer { display: none; }
And then get:
Good enough!
I then added this as a command to ewp, the WordpresS package for Emacs so that it can do the formatting automatically.
So there you go. Or not.