Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 51 of 427)

WordCamp Atlanta 2019: Web Apps with WordPress

I’ve enjoyed speaking at WordCamps since my first back in 2013. You can see a short list of the ones at which I’ve spoken here:

And this weekend is officially WordCamp Atlanta 2019.

WordCamp Atlanta 2019: Web Apps with WordPress

I took 2018 off of speaking for several different reasons, and I’m not planning to do much in 2019 (especially with another kid making her debut later this year ❤️).

But given the work I’ve been doing with WordPress over the past few years, it seemed fitting to apply to at least speak at my local WordCamp.

Continue reading

Using cURL to Determine If the Specified URL Is a Valid Page

Earlier this month, I wrote about finding the destination of a redirect using cURL in PHP. This can be a useful function to use whenever:

  • you know the URLs with which you’re dealing are going to redirect,
  • you know that the number of redirects will be limited to one.

Granted, in the latter case, it’s becoming more difficult because sites like, say, Twitter, have multiple redirects before you get to the destination.

But that’s a topic for another post (unless you just want to implement a recursive or iterative way of working through requests until you find the final destination).

Anyway, there’s another thing that can also be useful whenever you’re working with redirects and with cURL, and that’s determining if the specified URL takes you to a valid page.

Continue reading

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

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑