3 hours ago · Tech · hide · 0 comments

The Syndication Links plugin is great for linking out to social media posts related to your WordPress or ClassicPress blog entry. It can also send out those posts to some platforms. But it can’t possibly know every social network out there, or every Mastodon server, and so a lot sites outside the most common will show a generic website icon instead of something more specific. The plugin has a filter, syn_link_mapping, that you can use to add custom icons for different sites. You can also use it to add icons for different protocols, like if you add Gemini links to the types WordPress will recognize. For now I’m just adding icons that are already in the set, and mapping them to specific websites or to different protocols. You can see what’s in there by looking in syndication-links/svgs/ and its subfolders. Here’s how I’m adding them. Note the triple-equals sign for gopher and gemini, because in PHP strpos returns false if not found, and zero if found at the beginning of a string, and…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.