Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 160 of 258)

Personal opinions and how-to’s that I’ve written both here and as contributions to other blogs.

Implementing An Interface For The WordPress Settings API

This is the third post in a series on An Object-Oriented Approach To The WordPress Settings API. Part 2.

In the previous two posts, I’ve covered two things:

  1. Why it’s useful to define an interface for the WordPress Settings API
  2. An example of one such interface

At this point, it’s worth actually looking at what we can do to practically apply this stuff and implement the interface that we defined in the previous post.

Since I’m working on this series one step at a time (and thus, one article at a time), there won’t be anything functional yet however this is laying the foundation of what we’ll eventually be using to power a settings page in the Dashboard.

Continue reading

Defining An Interface For The WordPress Settings API

This is the second post in a series on An Object-Oriented Approach To The WordPress Settings API. Part 1.

Yesterday, I started a series in which I’m planning to layout to how to use some basic object-oriented practices to work with the WordPress Settings API.

Though I’ve covered the API in-depth before, I’ve found that there are ways we can further improve a project’s architecture if we stick to some guiding object-oriented principles. But in order to do that, it’s important to understand certain things such as classes, interfaces, and functions that are public, protected, and private.

For many, these are well-known concepts, but for others who are just jumping into the world of object-oriented programming (let alone WordPress), it can be a lot to take in and even more daunting to ask for help.

So I’m planning to take this post by post (or step by step or what have you) in order to make sure I cover as much ground as possible without overloading anyone. Oh, and questions welcome.

Continue reading

An Interface For The WordPress Settings API

This is the first post in a series on An Object-Oriented Approach To The WordPress Settings API.

One of the things that the WordPress Settings API has going for it is that it makes it possible to introduce menus, pages, input elements, and so on into the WordPress dashboard that have a native look and feel.

But if you’ve never dug into the API before, it can be really daunting. It’s not really intuitive, there are some confusing parameters, there is some difficult terminology, and the way in which you go about introducing various menus, sub-menus, pages, sections, settings, and so on can get confusing especially if it’s your first time around the API.

A couple of years ago I wrote a guide to the WordPress Settings API and it’s held up pretty well, but the more we use certain aspects of a language or API, the more we learn, right? At least, that’s been my experience.

And in this series of posts, I’m going to cover exactly that.

Continue reading

Product Diversity in WordPress is Good

This is something that’s probably true of almost any industry, but when you read enough WordPress-based tweets, blogs, and so on, you start to notice a pattern:

  1. Someone releases a project – it could be a theme, it could be a plugin, it could be a site that’s aiming to cover some aspect of anything involving WordPress – it doesn’t really matter what type.
  2. Someone comes along makes a comment like “Why do we need [this] when we already have [that]?”

Maybe I’m missing something, but I do not get that mentality. At all.

Continue reading

Self-Imposed Pressure in Programming

The older we get or the more experienced we get in the field in which we work, the more knowledge and wisdom we [hopefully] accumulate. During any given work day, one of the things that I occasionally find myself thinking about is:

If I could go back and tell myself [about a certain aspect of programming] years ago, then it would go something like [this].

For example:

If I could go back and tell myself about programming when I first started, I’d tell myself so slow down.

But what does that even mean?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑