Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 86 of 219)

Articles, tips, and resources for WordPress-based development.

WordPress Plugin Design: Namespaces and Autoloading

WordPress plugin design is not something that we often read about explicitly, is it? Instead, we often talk about functionality, performance, and things like that (not that they are unimportant, but they are just one part of the conversation).

When it comes to WordPress plugins, the functionality one offers may range from very small to incredibly large. And this is how it is with almost any type of product, isn’t it?

WordPress Plugin Design: WordPress Plugins

“Plugins extend and expand the functionality of WordPress. 46,537 plugins with 1,392,817,734 total downloads are at your fingertips.”

Sometimes, I think we have a tendency to want to say “focused, and lean” with smaller plugins as if a larger plugin can be described as such simply because of its nature.

But that’s not true.

There are very small, well-built plugins that offer one or two features. And there are large plugins that are also well-built that offer a plethora of features. On the flip side, either type may also be unfocused, cobbled together, and may be anything but what we’d like it to be.

When you look at the landscape of all that’s offered regarding WordPress plugins, it raises a few questions (at least from a developer’s perspective).

I’m going to cover them all in this post, too! Or not.

But seriously, one of the things I’ve been thinking about is this:

At what point do you begin organizing your code, so it includes namespaces, autoloading, dependency management, and other such features that take it beyond a collection of classes or functions?

This implies a lot about a given hosting environment and a developer’s level of familiarity with PHP and experience with other tools, but that’s secondary to the question (and I’ll cover all of that momentarily).

Continue reading

Custom WordPress Administration Pages

Creating custom WordPress administration pages isn’t always necessary if you’re going to use something like the Settings API. But if you’re working on a feature for a plugin or something that extends WordPress core in a way that requires more flexibility, it’s something that may be useful.

Custom WordPress Administration Pages

In some respects, it gives you more control, but you may also need to work on writing your system for displaying messages in the administration area, handling sanitization and validation, and so on.

It’s a lot to consider, and there’s a variety of use cases. In my latest series on Envato, I begin walking through some of the foundational requirements for working on custom WordPress administration pages.

Continue reading

More on Working with CSV Files in WordPress

CSV files are a topic that I’ve previously discussed on this blog. But one of the things that come with sharing information in this format over time is that new information, strategies, or techniques can be learned.

CSV Files in WordPress

This is one of the challenges of others finding old content, isn’t it? But I digress on that.

For those who haven’t read my previous entries, you can see some of them here:

And it’s not that those are irrelevant. I might change a few things here and there, but that’s the purpose of this post. Instead, I want to build on some of the things mentioned above.

After all, working with CSV files in web applications is nothing new, and it’s not going anywhere anytime soon. So why not share some additional strategies that I’ve found useful in making my projects a bit more robust (and see what you have to add to it in the comments :).

Continue reading

Uploading Files to a Custom Directory in WordPress

As it relates to uploading files in WordPress, the CMS offers some convenient API functions that make it easy for developers.

Uploading Files to a Custom Directory

The standard uploads directory in a WordPress installation.

Some of these functions include:

These functions, though, often require us to limit our files to the uploads directory. And many times, that’s great. It gives us a single place to store our files and it gives us one place to retrieve our files when needed.

But if you’re working on a web application or even an advanced plugin, this isn’t always the ideal situation. For example, let’s say that you have a plugin in which you want to have your own uploads directory, and that’s where you want to store your files.

What do you do in that case?

Continue reading

Updating Atom and the WordPress Coding Standards

For those who have read my Atom and WordPress Coding Standards post, then you should have everything you need when it comes to setting up the editor to evaluate your code with the WordPress Coding Standards.

Recently, though, the 0.10.0 release of the coding standards were published on GitHub, and it brings a lot of changes.

Atom and the WordPress Coding Standards

If you’re looking to begin upgrading to this new change, there’re a few caveats that you may experience when working with Atom and the WordPress Coding Standards.

They’re easy to address, though.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑