Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 51 of 427)

I’m Reducing Blog Content: The Newsletter

Over the next few months, I’m planning to make a few changes to this blog and the tertiary content around it. This includes the newsletter, the podcast, membership content, and more.

And by changes, I don’t mean getting rid of everything. Somethings, maybe, but certainly not all.

Between life and work, I’m busier than I’ve ever been – a good thing, to be clear – but I’m looking to simplify things where I can. And the newsletter seemed like one of the clearest places to start.

The blog, as it stands, will continue to be about WordPress development and I’ll continue to share content regularly; however, this month’s newsletter will be the last one that I’ll be sending on the regular.

Continue reading

Using Functions in Place of Globals: get_post_field

As PHP has continued to move forward and WordPress (and its developer-economy) works to begin using more of the more modern features, one of the things we still see happening is the use of globals within WordPress.

To some degree, it’s inevitable: Significant parts of the application were built using globals when that was the facility that was a primary feature; other parts, though, have moved forward by providing classes or functions that prevent us from needing to do that.

Case in point: get_post_field is a solid alternative to using the $post global that provides much of the same information in a slightly more modern (and arguably safer) way of reading the data.

Continue reading

How to Manipulate the DOM Using PHP

When it comes to manipulating the DOM, the first thing many of us likely think of is using JavaScript to do whatever it is we need to do.

Not only does the language natively support functions for doing this, newer features of ES6 give us more powerful ways to build client-side scripts. And if you’re using jQuery with WordPress, then you have the same library of functions for, ahem, querying the DOM that we’ve had for years.

But manipulating the DOM on the client-side isn’t always the best option. Instead, you may want to do so on the server-side. And because of some of the features built into PHP, it’s not much different from how we do things using JavaScript.

Manipulate the DOM Using PHP: Manipulate the DOM Using PHP: DOmDocument

Other than, of course, we’re doing so on the server.

Continue reading

Privacy is Hard: Email

A few weeks ago, I started writing about a couple of things related to privacy on the web (which is a topic that I think many of us think about in some capacity).

You can catch up on everything I’ve written about thus far, but this post is going to follow-up with something I mentioned in the previous post.

Specifically, I mentioned a simple alternative for not giving out your email address.

Although Burner Mail works well, I also think it’s worth using third-party services for your standard email, too. After all, it’s worth having your privacy protected there, too, right?

BurnerMail (and services like Throttle) are great for providing temporary email addresses with which you can still access those messages for some time.

Email Privacy: BurnerMail

But what if you’re looking for an actual email service that respects privacy and, say, doesn’t parse the information in your inbox to generate advertisements (or other similar functionality)?

Continue reading

Tools for Writing Better WordPress Code: The Composer Lock File

Before wrapping up our discussion on Composer, we have one important thing left to discuss: The vendor directory (and by extension, the Composer lock file).

Specifically, we need to talk about why we don’t need to commit the vendor directory to the repository but how our contributors can be sure they have the latest version of the software needed to work with our code base.

Using code quality tools to write better WordPress code is important, yes, but understanding how to properly manage dependencies and our repository is important, too. So before looking at said utilities, let’s review the lock file, the role it plays, and why we don’t need to commit the vendor directory to our repository.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑