Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 34 of 258)

Personal opinions and how-to’s that I’ve written both here and as contributions to other blogs.

A Case for Building Web Applications on WordPress

The content of this post is essentially the text version of the talk that I recently gave at WordCamp Atlanta 2019. Sure, some parts are left out, and some parts are modified but I do that since this is a different medium and certain statements or examples don’t translate as well. 🙃

The purpose of the talk, as you can tell from the title, is presenting a case for building web applications with WordPress.

I believe it can be done – because I’ve seen it done and worked with teams who do it – but before actually looking into the reasons why I think it’s a good foundation for certain applications, I also want to clarify terminology that we toss around a bit.

Ultimately, I want to define my terms so there isn’t any confusion, and then I want to use said terms to move forward.

But enough of the setup, right? Here’s the content of the talk.

Continue reading

Working with WordPress Transients and Authentication

In continuing with the content of the previous post, it’s important also to consider the use of transients and authentication.

Because there are scenarios where users are authenticated on a site (think of a members-only area of a site) and or aren’t authenticated on the site (such as site visitors).

These types of situations are present both on blogs and other sites and web applications across the board.

Continue reading

Using WordPress Transients Instead of Cookies?

I’ve written about using cookies in WordPress before, but one of the thing about doing so is that they typically after to fire within the context of an init hook.

When working in an object-oriented fashion and trying to de-couple certain pieces of logic such that you can use them without having to rely on other hooks, it’s important to find ways to handle this.

Otherwise, the code becomes tightly-coupled, and you can have hooks, do_action calls, or anonymous functions all over the place.

To simulate the nature of cookies and their feature of expiration, using WordPress transients via the appropriately named Transients API may be a viable solution.

Continue reading

Why WordSesh 2019 Is Worth Your Time

Ask anyone who’s been to a WordCamp and one of the things that you’re likely to hear that has the most benefit is “The Hallway Track.” The’s debatable on if it’s the most benefit, but it offers a lot.

For those who’ve never been to a WordCamp, then think of it this way: WordCamps are usually divided into tracks throughout the day.

These may include (but aren’t, of course, limited to):

  • Development,
  • Design,
  • Business,
  • and more.

The Hallway Track, though, is an unofficial name given to the time spent in between sessions where you get to meet people, see people you already know, or talk more about the things you’re working on, you’re learning, or just find out about new things that are happening in the various facets of the WordPress economy.

What does this have to do with WordSesh, though? Considering not everyone can make it to a WordCamp (for a variety of reasons), quite a bit.

Continue reading

Installing Multiple Coding Standards

I’ve talked about the importance of using coding standards (whatever standard you opt to use it up to you) and how to get PHP CodeSniffer (especially with Visual Studio Code) set up in several posts.

But there’s an interesting challenge that comes if you want to configure multiple coding standards with PHPCS. And this isn’t that strange a scenario, either.

Imagine you have several different projects on which you’re working – one uses WordPress’ coding standards, one uses PSR2, and one uses some other set of rules defined by the organization for which you work.

And you want to add them all as options to your configuration.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑