Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 187 of 427

Improved Ajax in WordPress: Object-Oriented Programming

A couple of weeks ago, I shared a post on Improved Ajax in WordPress. It provides a link to a tutorial that I wrote for Envato that shows how to incorporate Ajax into your WordPress project using procedural programming.

But not everyone who write solutions on WordPress uses procedural programming. Or you may prefer to write code using object-oriented techniques.

Whatever the case, including Ajax in WordPress is not limited to procedural programming.

To follow-up, I also wrote how to do the same thing in object-oriented programming.

Continue reading

Remove an Enqueued Stylesheet in WordPress

When working on a pre-existing version of a site, you may need to check if a style is already loaded. This, in and of itself, is not that difficult, but if it’s using an older version of a dependency, then it can get a little more complicated.

For example, let’s say that you’re building a plugin for an existing site. The existing site uses something like Font Awesome, but it’s using an older version.

Font Awesome

The requirements call for some updated icons that aren’t available in the existing version. Furthermore, the version of Font Awesome maybe be the minified version or not so we need to check for that.

Continue reading

Quick Tip: Selecting a Line Number in Coda

One thing about the output the PHP CodeSniffer is it tells you the line number where your problem exists. This feature has obvious benefits – it lets you know exactly where you need to jump to fix the problem.

Our projects, though, are usually a wide set of files with a lot of functions and thus a lot of lines of code. If you’re proficient with your IDE, then it’s a trivial task to hop to the file and the line number.

But what if you’ve migrated to a new IDE or you’re not sure of the shortcuts that exist in your current IDE? That is, maybe you know how to click to find the feature, but using shortcuts is so much faster, isn’t it?

Continue reading

The Responsibility of Understanding Your IDE

Everyone has their favorite IDE, right? Sometimes it comes from trying out the available options. Other times it comes from the advice of others.

Regardless, you’ve stumbled across your favorite utility for writing code. To that, I think one thing is critically important:

You have to invest time in understanding your IDE and all that it offers.

I bring this up because I see blog posts and tweets in which people promote their favorite editor. Great! Share the love and evangelize. Why not?

At the same time, I’ll see the same people talking about features they didn’t know exist in their editor.

No big deal – these are powerful pieces of software that help us do a lot. Sometimes, features aren’t easy to find.

Then again, we do have manuals and reference material.

And to that, I think it’s important that we, have a responsibility to fully understand our IDE. Especially if we’re going to be as proficient as we’d like with the tools we use.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑