The Difference in cURL and WordPress Requests cURL and WordPress remote requests allow us much of the same functionality. But we need to be able to determine which option is best.

cURL is a very popular PHP library that I’ve referenced in several posts other posts (1 and 2, for example). And it’s one that I think should be reviewed, explored, and possibly used by anyone working in PHP (yes, even those working in WordPress).

But because of the native WordPress APIs, we do have a level of abstraction that allows us to achieve much of the same functionality (if not the same functionality).

Specifically, I’m talking about wp_safe_remote_get.

This function is ideal when the HTTP request is being made to an arbitrary URL. The URL is validated to avoid redirection and request forgery attacks.

I specifically mention the safe variant of this function for the definition above (there is another variant, but it’s important to take precautions against arbitrary URLs for security reasons).
Continue readingThe Difference in cURL and WordPress Requests cURL and WordPress remote requests allow us much of the same functionality. But we need to be able to determine which option is best.

A Case for Building Web Applications on WordPress A high-level overview of how it’s possible to go about 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 readingA Case for Building Web Applications on WordPress A high-level overview of how it’s possible to go about building web applications on WordPress.

Working with WordPress Transients and Authentication When working with membership-focused sites, it's important to also consider the use of 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 readingWorking with WordPress Transients and Authentication When working with membership-focused sites, it’s important to also consider the use of transients and authentication.

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.

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.