Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 97 of 428)

When Is jQuery’s Clone Function Useful?

One of the challenges of learning a library (be it the standard library of functions that come with a programming language or a third-party project) is two-fold:

  1. learning the functions that are available,
  2. learning how to use said functions.

And, really, sometimes even learning how to use said functions isn’t all that hard – it’s knowing when to use a given function to help minimize code while still achieving the goals of the project.

Continue reading

A Few Gulp Packages for Starters

Software like Gulp and other utilities aren’t new. For those who haven’t used them before, it can be a little daunting to get started (but it really shouldn’t be).

A Few Gulp Packages for Starters

In comparison to tools like CodeKit (which I still like and recommend, depending on the project), they have a little more overhead regarding getting them set up, configured, and ready to go.

But once you’ve got it all set it up, it can be really useful with a distributed team regardless of operating system, and it can help it make your build process a bit more robust.

That’s not the purpose of the post, though. Instead, here’s a list of a few packages for starters.

Think of them this way: If you’re looking for ways to work with Sass, JavaScript, and image optimization, these are good libraries.

Continue reading

Adding WordPress Modal Dialogs (Using Static Data)

In the previous post, I walked through the process required to get WordPress modal dialogs to appear within the context of the administration area.

This uses:

  • the built-in WordPress API,
  • the provided Thickbox library,
  • and some example code for getting it to display.

In this tutorial, I’ll walk through populating the modal dialog with data. After that, I’ll share how to populate the data dynamically using Ajax.

Continue reading

Why Bother With Autoloading in WordPress, Part 2

In the previous post, I covered a few points as to why I think that include_once, require_once, and other similar statements result in poor development practices (at least when it comes to the work we’re doing with our WordPress projects).

If you haven’t read it, no big deal. The gist of the post is that these statements make:

  1. debugging more difficult,
  2. tracing code harder to do.

Ultimately, they are things we can avoid. I ended the post with the following:

This still leaves the question of why autoloading (or any inclusion of third-party files) is needed at all.

And though I’d love to cover all the details in this post, it’s going to take this and one more post as its important to understand some foundational topics on languages, interpreters, and compilers before getting too far ahead.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑