Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 44 of 258)

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

Writing Loops in PHP: Two Ways; Same Thing

When you’re working with a collection in PHP, most notably, arrays in PHP, there are two ways in which you primarily see the information manipulated:

  1. through for loops,
  2. through a variety of the array functions that PHP provides.

For what it’s worth, I think the array functions provide greater readability but they have been shown to be slower (especially with larger data – with smaller data, it’s naturally going to be negligible).

I often work with for loops and related functions to achieve the same thing but I thought it might be worth look at an example from the previous post and how I used the array functions to achieve the same things as a for loop.

Ultimately, this is is a comparison post but I think it’s good to see how the same code can be written in different ways.

Continue reading

Migrating From Bitbucket to GitHub: The Complete Guide

When it comes to Bitbucket and GitHub, each offers their advantages and disadvantages. I’ve used them both and like them each for different reasons.

Migrating From Bitbucket to GitHub: Bitbucket

But I prefer GitHub for a few more reasons than Bitbucket (the least of which is not that my organization was hosted there). And I like to have everything, more or less, under the same service.

Migrating From Bitbucket to GitHub: GitHub

I’ve spent some time over the past week migrating from Bitbucket to GitHub. I currently maintain two personal accounts:

  • one for myself,
  • one for Pressware.

I’ve opted to downgrade my organization account to a personal account to save money and because I’m more or a less a company of one who occasionally has collaborators.

Various guides online leave something to be desired when it comes to walking through how to go about migrating from Bitbucket to Github, so I thought I’d share my experience for doing that.

Continue reading

WordPress Widgets: Refactoring, Part 5

In the previous post, we created a Registry that is going to be used to store all of the various classes responsible for giving our widget its functionality.

To do this, there’s going to be a variety of other classes introduced, but before going there, we need to add the Registry to the plugin’s bootstrap (let alone create a bootstrap for the plugin).

Specifically, here’s where we left off:

As mentioned earlier in the post, we need to add this to the bootstrap of the plugin. To do this, though, we need to define our own filter so that we can easily pass the registry around the rest of the plugin (when the time comes to do that).

So in this post, we’re going to focus on doing exactly that.

Continue reading

Adding a Plugin Settings Link

Whenever you’re building a plugin that introduces a submenu, and you’re using the proper APIs, you’re going to be creating an administration page (whether or not it has settings).

When doing this, though, you can also introduce a plugin settings link. These are the links that appear under the name of the plugin from in the plugin dashboard.

Plugin Settings Link

If your plugin introduces its submenu item, then it likely introduces its own settings page. And if you’re looking to associate this page with your plugin settings link, it’s really easy to do.

Continue reading

Gauging WordPress Podcast Interest

Over the break, I had a lot of time to think about different things as it relates to Pressware and this blog. One of the things I’ve been thinking about for months now is the idea of starting a podcast.

WordPress Podcast Interest

I talked a bit about the initial idea some time ago. In the post, I mentioned the following:

I’m not particularly interested in doing the “interview others” for a podcast because other people are doing them so well and they are interviewing such interesting people.

But I did wonder if there’s not some room for a question-and-answer format. I know many podcasts end their episodes like this. However, I’m interested in experimenting with short podcasts (that is 10 – 15 minutes max) and those that answer questions.

The TL;DR version of the rest of the post is simple:

  • If you have five minutes to spare, would you mind answering the following survey? It’s not closed to anyone, and this will help me to gauge interest in doing this. All submissions are kept completely private.
  • The podcast will be short (20 – 30 minutes in length), will have a primary format, and will be geared towards anyone involved in WordPress.

Still curious? Read the rest of the post.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑