Using WordPress Transients Instead of Cookies? To simulate cookies and their feature of expiration, using WordPress transients may be a viable solution.

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 readingUsing WordPress Transients Instead of Cookies? To simulate cookies and their feature of expiration, using WordPress transients may be a viable solution.

Episode 5 – Events and Competence In this episode, I answer two questions: One on the Event-Driven Design Pattern and one about blogging.

Regarding the podcast, two of the best things that’ve happened since the previous episode is that the number of questions is steadily increasing and people are saying they appreciate the length of the show.

So that’s good stuff, as far as I’m concerned.

Anyway, if you’ve previously subscribed to the show, then this episode should be available in your favorite app or service.

With that, here are the notes for this episode.

Continue readingEpisode 5 – Events and Competence In this episode, I answer two questions: One on the Event-Driven Design Pattern and one about blogging.

Why WordSesh 2019 Is Worth Your Time If you've never heard of WordSesh then you can simply think of it as an online WordCamp. And WordSesh 2019 is poised to be great.

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 readingWhy WordSesh 2019 Is Worth Your Time If you’ve never heard of WordSesh then you can simply think of it as an online WordCamp. And WordSesh 2019 is poised to be great.

Installing Multiple Coding Standards There's an interesting challenge that comes if you want to configure multiple coding standards with PHPCS.

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 readingInstalling Multiple Coding Standards There’s an interesting challenge that comes if you want to configure multiple coding standards with PHPCS.

A Misaligned View: Prioritizing Peers Over Users When working on a project, make sure that you're not constantly prioritizing peers over users.

How many times have you looked at someone’s code and stated:

I’m not using this because it doesn’t look well-written.

And in this case, “look well-written” might either be a substitute for:

  • “look like how I would write it,”
  • “seem to make sense to me.”

Sure – there are times where using open source code is risky. We know this from the various software and services that show up with vulnerabilities. But, at least for this post, treat those as the exception – not the rule.

This means we’re left with looking at something we may use but opt not to use because it doesn’t seem to be written in a way that we think it should be written.

Continue readingA Misaligned View: Prioritizing Peers Over Users When working on a project, make sure that you’re not constantly prioritizing peers over users.