Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 113 of 219)

Articles, tips, and resources for WordPress-based development.

What Are Object-Oriented WordPress Meta Boxes?

I’ve written several posts about WordPress meta boxes. Perhaps the series of posts closest to what I’m going to touch on in this post is the one that outlines:

  1. Aiming For Simplicity
  2. Separating The Logic
  3. Each Component
  4. The Front-end

You can read each of these if you want, but they aren’t necessary for this particular post. If you’re familiar with WordPress meta boxes and how to create them programmatically, then you should be good to go.

The short of it is this:

There’s a consistent way to create WordPress meta boxes in an object-oriented way. This includes an interface, defined methods, and permission and security checks.

A lot of people who work with WordPress use third-party code to create these features. This includes other plugins or generators. That’s fine. I’d say that falls more into the implementor camp, but that’s beside the point.

Further, it’s not the point of this post. Instead, this post focuses on concepts for WordPress developers looking for object-oriented solutions.

Continue reading

More and More JavaScript in WordPress

I wasn’t able to attend WordCamp US (cue jealousy rage! :), but I’ve thoroughly enjoyed many of the blog posts that I’ve read about the conference.

It’s easy to be proud of the software and to continue wanting to work with it, isn’t it?

With all the chatter around Calypso, React, and JavaScript, there’s a lot to cover. If you’re a web developer, this is something that may be overwhelming to take in. For some, this is a natural progression of their career.

Regardless, JavaScript is going to be playing a major role in both WordPress and the web in general. This is holding true to Atwood’s Law:

Any application that can be written in JavaScript, will eventually be written in JavaScript.

Say you’re a WordPress Developer, but you’re just now getting a hold on jQuery. How are you – or we – supposed to pick up on all the new technologies

Continue reading

Looking For a Buyer For Live Theme

Years ago, the previous team with whom I worked built a theme tailored for a live event. Once the event was over, we refactored a bit of the code and began selling it.

When 8BIT folded, one of the previous team members took it over and has been selling and supporting it. The theme has continued to sell well for the past few years.

So much so that a couple of years ago, Eric approached me about building out the next version of the theme. So, starting from scratch and using newer technologies, that’s what we began to do.

But as our businesses changed and the demands on our time changed, the focus on Live Theme changed, as well.

The short of it? We’re looking to sell the theme.

Continue reading

What is WordPress kses?

Work with WordPress long enough and you’re bound to come across something called “kses” or the wp_kses function. Perhaps this comes with writing your own code, or it comes with reading someone else’s source. Or maybe in reading core.

kses

Whatever the case, the function has a weird name, right?

I mean, a lot of the WordPress API functions have clear names so it’s easy to know what you’re doing. This one is more of the exception than the rule. That doesn’t change anything, does it? I mean, it still raises the questions:

  • What’s the purpose of the function,
  • Why does it matter,
  • Why should we use it,
  • And what purpose do its variations serve?

We should be asking these questions for all functions with which we work. But when the name isn’t clear, the answers aren’t as easy to deduce.

Continue reading

Priority of Ajax in WordPress

Let’s say that you’re working with Ajax in WordPress. And let’s say that, whatever you’re building, is using object-oriented programming.

Depending on the complexity of your work, you may find that how you’ve implemented your Ajax functionality doesn’t work.

That is:

  • You’ve implemented the proper hooks
  • You’ve got the callbacks defined
  • You’re `echo`ing the data properly
  • You’ve got the `wp_die()` call at the end of each request
  • And you’ve setup `console.log()` or other debugging statements in your Development environment

But you’re still seeing the request return 0 for everything you’ve implemented.

What gives?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑