Going back to an old project

I started making WordPress plugins about 5 years ago, and one of my first was Auto More Tag, which essentially just adds a “Read More” button automatically into your content. Now, this seems like an easy thing to do, but at the time I had no idea how to go about it. I ended up coding it to insert the more tag into the content during the saving of the content. Once it was working, I left it to do other things.

Let me make something very clear, something that this very plugin taught me.

It is never a good idea to change the content of someone’s website with a plugin.

Read those words. They’re in a blockquote because they’re important. Do not do this. Ever. Do not do it. You might think it’s a good idea, but it’s not. At the time I was naive, and thought I could get away with doing this. I couldn’t. It’s bad. So very bad.

And the support forum taught me that, with many people cursing my name because of deleted content, and rightly so. Turns out that I hadn’t put in support for multibyte strings, so our non-English speaking friends were getting their content chopped. This isn’t a good thing, but I had no idea how to fix it.

Then a developer offered to add in MB String support, and I let him fork it, and take over. Then I stepped away for a couple years. I’ve just recently opened the code back up after getting a few emails that the plugin wasn’t working.

Now that I’m a bit more seasoned, I realize exactly how stupid it was for me to edit content. I realized this before, but now I actually have an idea of how to fix that stupidity. In release 4.0.0, which I pushed out to the WordPress plugin repo this weekend, I’ve converted the codebase from inserting on save, and editing the content (read the quote above) to now using a filter on page load to insert the more tag.

This is a much better way to handle things, and I’m happy to do it.

I’m also happy to see that one of my very first plugins, and in fact the very first plugin I ever released on the WordPress repository, is still being used today. 4 years later.

Future Plans

I plan to improve the settings page, and clean up the code a bit, make it easier to understand. But a lot of what I plan to edit has to do with the development environment. I’m hoping to encourage people to help me to improve the plugin.

Aside from that, I’m looking forward to improving the user experience, and making the plugin even simpler to use. Possibly adding in additional ways to customize where and when the More tag is added.

“Generally WordPress plugins work really well … when they’re small. When you build something that solves one particular problem, or improves one specific WordPress feature, or does something very … purposeful.” – John James Jacoby, LoopConf Vegas, 2015

Leave a Reply