Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 147 of 428

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

Yet Another Blog (Gotta Go Your Own Way)

This blog has been discontinued and you can read more about it in this post.

The idea of starting another blog seems daunting especially when I try to write for this one on a daily basis. But to say that I enjoy writing is a bit of an understatement.

The other caveat is that I try to be pretty focused on the type of material that I write about on this site. I’ve made some mistakes with this blog, sure, and I’m working on rectifying that especially over this next month.

Several things have come from this blog, though. For example, I get tweets, emails, and other forms of [sometimes creepy but maybe just kidding] messages about how I run my business, how I manage my time, what applications, sites, services, and so on that I recommend.

All of those topics are fun to talk about, but they don’t fit in with the whole idea of “a perspective on professional WordPress development.”

So what am I supposed to do when there’s more that I’d like to write about but don’t have a place to do it?

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

Singleton Design Pattern and Dependency Injection, Part 3

In the previous two posts (available here and here), I talked a bit about the Singleton Design Pattern, dependency injection, and dependency injection containers.

Singleton Design Pattern as a Dependency Injection Container

Not that kind of container (but it’s still a cool shot).

These are all topics that I think are important for developers to know and to understand. If you’ve not read the previous posts, then I recommend it because the code that’s shown later in this post assumes you know a little bit about each of the topics mentioned above.

Furthermore, this is going to be a bit shorter as it relates to the previous two posts. The purpose is simply to show how to use a singleton as a simple dependency injection container.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑