A couple of weeks ago, I shared a small plugin I was working on, Remove Empty Shortcodes, that will – as the name implies – remove empty shortcodes from posts and pages where shortcodes are no longer present.
Today, I’ve tagged another release of the plugin and its available for download on GitHub.
If you inherit a WordPress codebase, regardless of the age of the project, there may be a lot of context that you don’t have as to why certain decisions were made or how things were implemented.
This may include the server, infrastructure used to help power the site or the app, and other contextual information about the environment in which it was running.
This type of information can be server-related information, PHP version, database type, information that’s actually stored in the database especially if you do a database import, and so on.
Ideally, all of this is handed over but that’s not always the case. Anyway, say you attempt to start it up and then when you attempt to start up the application, not only does it not work but it either shows a white screen or displays a message about technical problems with your installation.
There are a lot of nice packages that we can use in our PHP-based projects and if you’re using Composer or GrumPHP, PHPCompatibility is one that I recommend including your projects especially if you’re writing code for something that’s going to run across multiple versions of PHP (that is, on hosts that offer different versions).
This is a set of sniffs for PHP CodeSniffer that checks for PHP cross-version compatibility. It will allow you to analyse your code for compatibility with higher and lower versions of PHP.
This is something that be installed within composer and it’s something that I recommend for people writing code for WordPress because of how much variation exists within our hosts.
Occasionally, though, you may see a problem like this:
And if you run $ phpcs -i you may get a message that’s unclear.
As I head into December of this year, this will be the final – and obviously the third – time I take off the social web for the remainder of the year. At least that’s the plan. I’m thinking of doing it a little bit differently this year.
For those of you who haven’t read about my doing this in years past, check out:
Though I don’t really do year in review posts, going back to read these and see how things have panned out over the years is always fun and is as close to retrospectives as I get.
With all of that said, I’d summarize the entire year by saying: It’s been a year, if nothing else. Some ways bad, some was fantastic.
When retiring the memberships, I wanted to make sure I was able to maintain the integrity of all of the posts that I’d published simply without the shortcode that comes with RCP.
What started off as a simple plugin to remove the RCP shortcode turned into a plugin to remove all empty shortcodes. I’m opting to open the plugin’s repository so anyone can access it (or contribute issues, code, or create their own fork from it).
At the time of this writing, the plugin is at0.4.0 so there’s not much to expect. But I enjoy reading the what and why other developers do in their projects, so I’m going to do so with Remove Empty Shortcodes.
Kinsta offers premium managed WordPress hosting for everyone, small or large. Powered by Google Platform and strengthened by Cloudflare, they take performance to the next level. All hosting plans include 24/7/365 support from their team of WordPress engineers. Get startedwith a free migration today.
If you are looking for WordPress guides and unbiased reviews, I recommend checking out WPKube. They also have an exclusive deals section.
Just Getting Started with WordPress? I write a lot about WordPress development but if you're just getting started, I recommend checking out WPBeginner. They have free training videos, glossary, and more.