Why I Haven’t Embraced WordPress Blocks

As someone who maintains a very specific set of WordPress plugins, over the last few years, I’ve been asked why I have not updated them to the block editor. The simplest reason is I don’t use the block editor, and I write the plugins for me, not for a commercial purpose, so while I keep saying I’m likely to give in and actually write some simple blocks just so people other than me can use them, it has been a hard road for me to take on such a project for others.

So, why don’t I use the block editor? Or why haven’t I embraced blocks in any way? It comes on two sides of the fence. The user and the developer side.

The traditional WordPress post is based around a single content field, in which HTML is saved. Now, you can enhance that with filtering, but anything that isn’t that content has to be handled separately.

So, compare this to blocks. Blocks are these pieces designed to be used in content. That allows you to do other things..have more complicated code for each block, or just a simple HTML structure.

However, this is exactly what HTML is for. I wouldn’t object to blocks for site-building, but for writing a post, I just want a nice rich HTML editor.

When blocks are saved to content, they end up as a combination of rendered HTML with the block code in HTML comments so it can be parsed and rerendered when edited. It also supports dynamic content, which would not be rendered when saved.

I’d actually considered this long before Gutenberg was proposed for Microformats. Microformats are embedded in HTML as classnames…I’d thought of creating an editor that stored this in content, and parsed it out in the editor.

So, it’s more than need most of the time for what I want to write. I’m either writing an article…a quick note(microblogging style), or sharing an event/link/etc, or sharing a photo. I don’t need most of the stuff being offered.

If you read this quote from the WordPress FAQ, we’re in alignment on this point:

“The classic WordPress editor is an open text window—it’s always been a wonderful blank canvas for writing, but when it comes to building posts and pages with images, multimedia, embedded content from social media, polls, and other elements, it required a mix of different approaches that were not always intuitive.”

So, that covers the user side. What about the developer side?

I am used to developing in PHP, server side. I write code using vim. So, what do I need to write a block according to WordPress?

  • I need to learn Javascript ‘deeply’. Can’t say I’m motivated on that.
  • I have to set up a build environment to support that if I want to go all in.
  • I have no way to enforce Microformats structures in the block editor.  But…if someone wants to do a reply to 15 things in the same post, should that really be a problem for me?

For me, Javascript is meant to handle simple HTML manipulations and for calling server side to update a page. I rarely use it for anything else.

So, what about my IndieWeb plugins?  Well, some of the questions I have there are something a motivated person might be able to help me think of. Also, it is quite possible I’ve completely misunderstood something about blocks by not using them more.

  • IndieAuth – Needs absolutely nothing I can think of. It’s an authentication plugin after all.
  • Webmention – Other than maybe some settings options in the block editor, nothing here occurs to me.
  • Micropub – Is there a simple way to create blocks in PHP so you can convert incoming Micropub posts into blocks? But you’d need some specialty blocks to represent various Microformats properties, which you’d need also for Post Kinds.
  • Indieweb Post Kinds actually does a few different things. It creates a taxonomy to classify posts, similar to the old post formats options. This just allows for automatic creation of archives. I also use the selector to change the interface, but this could be done differently. It also uses Parse This to create rich embeds of linked content. But it adds the microformats for different types of Indieweb posts outside of the traditional content block using WordPress filters. That is something I never particularly liked, and wouldn’t mind replacing with something integrated into content. Just not sure if blocks would be better for that, being as you can’t necessarily identify what is the content piece. I very deliberately started the process of decoupling parts of Post Kinds just in case someone wanted a block editor interface to the backend logic.
  • Syndication Links – The plugin allows you to add links to a post reflecting another version of that post elsewhere. So, this is fine if you go to a post, and add them in…but not necessarily if you want to trigger syndication and bring back the results in your posts. Of course, it sounds like a dynamic block could possibly do this.
  • Simple Location – Probably is not a problem here to make this work as a block plugin, however, the location and other properties are stored in post meta. However, to use post meta dynamically, it needs to be added to the WordPress REST API so it can be polled via the block editor. But this is already a problem for me. Location can either be public or private…so, whether to share the location data to the REST API is based on the value of another field. register_meta has an option for an auth_callback, but that is for updating post meta values. Other than that, probably just a matter of motivation, as before.  But it would be the most likely for me to experiment with if I ever decided to try.
  • Indieweb – The Indieweb plugin has several widgets that could be converted to blocks. There is the problem of the logic that allows rel-me links to end up in the header if there is not a visible display, but that could be worked out. Also, always convinced the H-Card Widget could be styled better.

So, there we are. I’d love it if someone commented…to either tell me why I’m wrong about something, or what I might consider.

Syndication Links for WordPress Version 4.4 Released

Version 4.4 of Syndication Links is a major rewrite of the code to cleanup the plugin. It fixes a bunch of small issues, as well as adds new features.

  • A new filter tells the plugin to add or not add the links to the content in the event your theme supports directly displaying it
  • Add an option to specify which post types will present syndication options
  • Add an option to disable forking syndication into the background in the Post Editor and doing it immediately.
  • A newly redesigned settings page
  • Fix of an issue with Mastodon Autoposter

The biggest new feature is the introduction of support for both Bridgy via Webmention and Bridgy via Micropub. In this first version, it just converts wordpress properties to Micropub properties. It may be necessary to become more opinionated in future versions and feedback is welcome.

Decided to upgrade my network infrastructure. For the first time since the early days of my home network, I’m going to give using a full computer a try. I’ve ordered an inexpensive mini PC that has two ethernet ports, and am thinking of trying OpnSense.
Replied to https://boffosocko.com/2022/11/17/55811695/ by Chris AldrichChris Aldrich (boffosocko.com)

This is a brilliant idea and is broadly what underpins the mission of the IndieWeb space for the past decade. The difference is that it isn’t platform specific and a large portion of it is already built and working! Of course it’s in different stages and forms of usability for various platforms,…

I’m in.

Rel-Me Profile Link Verification on WordPress for Mastodon and Other Services

With the recent interest in Mastodon, there have been a lot of people using WordPress interested in taking advantage of their rel-me link verification feature.

Rel=”me” is a property you can add to links to say that the link represents the same person/entity as the page being linked from. Bi-directional rel-me link verfication means page A and page B both link to each other with rel-me…so you can prove both are under the control of the same person.

On Mastodon, doing this gives you a verified indication in your profile. But, the Indieweb community has already been using this for years for the same purpose.

There are a lot of WordPress plugins for Indieweb Building blocks. But for identity, this is built into the Indieweb plugin itself. In addition to suggesting other plugins to add more Indieweb stuff, it offers the identity features using rel-me.

On the Options page in Admin for the plugin, there is an option to set whether or not the site represents a single person/entity, and to set who the default author is. If you don’t set it, it will put the rel-me links on your author archive(usually /author/username). Otherwise, it will put them on the homepage.

It adds standard profile fields under your URL and uses them to generate rel-me links. By default, these links are hidden links, not visible, so they should just work.

However, if you want them visible, there are 2 options

  • One of two widgets. One for an entire profile with the rel-me links displayed as icons, the other for just the links displayed as icons
  • Manually adding them to your theme.

I know we should have a block, but I confess to never having written one. One of these days I’ll have to bite the bullet and do so.

I’m back from my vacation, where I spent a lot of time field-testing my venue code. As far as I can tell, it is working perfectly, but field-testing is what allows me to figure out the tweaks I need to make the experience better, so there will be some point releases over the coming weeks as I make the experience better. Here is an example of one of my venues…I tried to use some code to import old checkins at venues and create new local venues replacing ones I’d linked to remotely. However, it did create some duplication, so I will need to spend some time cleaning it up. Also, if I want to classify my venues and provide descriptions, I’ll need to add those.

Simple Location 5.0.0 for WordPress Released

Weeks in the making, I’ve released version 5 of Simple Location. Several weeks in the making, it is a major rewrite of the lower level code, and will open up to a variety of different future features.

This version retires Zones, the way I used to keep where I was private by default. But it does so by replacing it with a long desired feature…venues.

The way I am seeing data is changing as a result. By default, the display for a post will display the venue name if attached, then by default the location taxonomy, and finally, the textual description attached to the post. Displaying the location taxonomy by default is an option in the settings.

Right now, Venues can be created manually in the interface or created automatically if there is a check-in posted via Micropub. I have yet to create an interface to do it during the posting process, so there is work to do in a future version.

I’ve added some new providers, and done a lot of tweaks to existing ones.

I was eager to get this out, because I will be traveling this week, and would like to make some venues.