Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 120 of 427)

Namespaces and Autoloading in WordPress

In my talk for this year’s WordCamp Atlanta, I’m going to be talking about namespaces and autoloading in WordPress.

Namespaces and Autoloading in WordPress

When I don’t yet have the images I want for my presentation, I use stock photos.

While working on my presentation:

  • I’ve been working on a project for someone in which I’m writing an autoloader from scratch,
  • I’m talking with other developers about their preferences with writing autoloaders,
  • I’m looking at open-source projects to see how others are writing autoloaders.

All of this is primarily done to see how, if it isn’t obvious, others implement namespaces and autoloading in their projects. What’s interesting is that there seem to be three main ways in which people go about doing it.

Continue reading

Manipulating WP Admin Bar Styles with Events

I’ve mixed feelings about the WordPress admin bar, but that has to do with how third-party solutions add their options to it (plus, it can be disabled if you’re not a big fan of it).

Recently, I published a small plugin – meant primarily for developers – that allows users to toggle admin notices whenever they are working with WordPress (ideally in their local environment, though it can be installed anywhere WordPress is installed).

WP Admin Bar Styles: Toggling with Events

The plugin is simple:

  • It introduces an item into the WP admin bar,
  • When you click on an item, it will toggle any notices or messages that are displayed,
  • When you click on it again, it will toggle their visibility.

But there’s a small nuance that I think is worth covering and that has to do with manipulating the WP admin bar styles using client-side code.

All of this is covered in the initial post, but one aspect of the code that I think is worth sharing for those working with the admin bar and those working with JavaScript.

Continue reading

How Do I Know When to Hire Someone?

Last week, I talked a little bit of how I schedule my time on a per week basis with a team of other people and the whole idea of “less, but better” from Essentialism.

When To Hire Someone: Scheduling Time Plays a Role

Though this isn’t a regurgitation of that post (because that’d be dumb 😇), it is a meant to show one way in which I go about doing that when there are some projects, project management, presentations, and other responsibilities all happening at the same time as I’m writing this post.

So what are we do to when our plate is full of things to do, and we’re not sure how to manage the time and responsibility? Perhaps that’s how we know when to hire someone.

Or maybe not.

Continue reading

Where Do I Start With WordPress? (An Upcoming eBook)

A little over a year ago, I launched my first membership site which I called The First Version.

The idea behind the name wasn’t anything clever – it was the first time I’d tried something like this, it was the first version of the site, so the name was something that was quick and easy to register and set up.

Then, for the second iteration of the site, I called it Start Here under the idea of answering the question “where do I start with WordPress?”

Start Here with WordPress

The original “Start Here” landing page.

Anyone who has jumped into WordPress and begun to develop (or begun to try to develop) themes, plugins, applications, or any other type of solution for others knows that it can be difficult to know where to start.

Rather than offering another closed membership site, I’m going to be publishing an eBook called Start Here which still aims to answer “where do I start with WordPress” but does so in an easier and cheaper format.

Continue reading

Find The Difference in Dates Using PHP (and WordPress)

Working with dates in PHP is one of those things that you either have a good handle on, you’re working on understanding, or you’re stuck in the rabbit hole of the documentation that’s in the manual.

Difference in Dates Using PHP: The PHP Manual

If you’re working with WordPress, though, the chance that you’re going to need to work with dates is quite high. Nearly everything that we publish has at least one date associated with it.

This includes post, pages, custom post types, revisions, drafts, and so on.

Furthermore, there’s a chance that custom work that you need to develop with require that you find the difference in two dates using PHP. And though there are multiple ways of doing this, there’s a process that I’ve been following for something.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑