Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 172 of 428)

Escaping Strings For WordPress Database Queries

Escaping strings for WordPress is something that developers should be doing at any place in which the user can be sending information across the wire to the database.

Core offers some nice API functions for this. But if you’re writing a raw database query using $wpdb (which is something that I recommend only when an API doesn’t offer what’s needed), then there are still options, but you may need to fall back to a native PHP function.

Case in point: mysqli_real_escape_string.

Continue reading

My Experience with a Standing Desk

Standing desks have been relatively commonplace for a few years now. I would say that it seems to be more prevalent in technology than anywhere else.

But I know better. I’ve read other more general blogs talk about them, as well. So, you know, technologists aren’t that unique after all. Who would’ve thought?

Generally speaking, they seem to be common for anyone who tend to work in a more sedentary environment.

There are plenty of articles all over the Internet about their advantages, but there are also articles that talk about how standing desks can do more harm than good.

What else would you expect, though? I’ve been using a standing desk for a little while now, and I thought I’d share my thoughts thus far.

Continue reading

CLI: A Cheatsheet For The Command-Line

The CLI is one of those tools that I think every developer should know how to use even if they don’t use it consistently. After all, we have plenty of applications for taking care of tasks, right?

The thing is, from time-to-time, it’s useful. During the process of working on projects, you may be hopping back and forth between an IDE, an SSH session, S/FTP, a task runner, debugging, and so on.

Sometimes, particularly in the beginning, it’s hard to juggle all of the commands in your head.

Though I love using applications to help take care of certain tasks, I’ve never fully let the command-line go. Sometimes, it’s just faster to type out a string of commands and let them do their work rather than poke around a number of different applications.

Maybe that’s stubborn. I don’t know. But what if you’ve not used the CLI? How do you maintain a quick reference to the available commands?

Continue reading

Advertisements via Postmatic

Advertisements are one of those things that I’ve always been careful about introducing because I don’t want them to clutter the content or feel too, you know, intrusive as it relates to reading this blog.

To that end, I’ve generally kept them pretty minimal in terms of what’s allowed to display on this site.

People get their content in so many different ways now (email, Twitter, etc.), and the landscape seemed to have changed for some once Google killed Reader. Then again, some of us still use a reader (what’s up, Feedly? :) for the majority of our content.

For those who read this site in your browser, you’ve no doubt noticed the advertisements in the sidebar. As stated, they’re minimal by design:

  • No animation
  • No sound
  • No attempt to be more intrusive than the content itself

This is because so many advertisements on the web are obnoxious. At the same time, running a site and promoting content from other companies and individuals within the WordPress economy is something I want to do.

It also helps the site to be self-sufficient in that it covers the costs of what’s needed to run the site, so that’s something I greatly appreciate.

As of today, I’m adding a similar setting for advertisements via Postmatic to display in the footer of my emails.

Continue reading

The Perfect WordPress Development Stack

The “Perfect WordPress Development Stack” is one of those topics that comes up now and again in various blogs (and here it is again – how meta, right?), talks, tweets, and so on.

And I think it’s a good point of conversation. If you’re working with WordPress in a professional capacity, then you should have a stack that maintains some level of professionalism.

But what does that look like? It’s likely that some of you know where I’m going with us and the answer may sound like a cop-out.

It’s not, though. It’s generally what I’ve found to be true.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑