Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 103 of 428)

How To Use GitHub PR Templates

If you do any work – regardless of if it’s open source or closed source – (though I know most who use read this site are involved in open source), you likely use some source control, and it’s probably GitHub.

For many of you, you either follow a project, contribute to a project, or handle pull requests to a project. And what about those projects that you work on with a team?

Perhaps your workflow is something like this:

  • you create a branch to work on a feature,
  • you push the branch to detail the work you’ve done for a peer to review,
  • the review is merged,
  • you carry on.

But what do you put in the template for the pull request? Is it the same every time or is it different? What about if the content of the PR is related to something in Trello, Asana, Basecamp, or some other project management system?

That’s where GitHub PR templates come into play.

Continue reading

Using WP-CLI on Your Host (Regardless of Your Host)

At this point, I think most people who develop solutions WordPress on a regular basis are familiar with using WP-CLI. Installing it locally on your system is one thing, using it on your host is another (but it’s all the same once you’re connected).

Case in point: Lately, I’ve been spending a few evenings and times during the weekends working on this site and trying to get it ready for the upcoming redesign. Part of doing that includes using WP-CLI.

If you’re someone on SiteGround (or any host that support WP-CLI, really) and are looking for how to get started using WP-CLI on your host, here’s a quick primer that should provide you everything you need to know to get up and running.

Continue reading

What’s Too Much For Passing Data via Dependency Injection?

The topic of dependency injection is one that’s been around for some time in object-oriented programming circles. Sometimes we see it in WordPress; sometimes we don’t.

I’m a fan of it but, honestly, though, I’m not always sure how much information to inject into a class. I mean, let’s say that we’re given two classes, and one holds information the other needs.

  • Do we inject no class into another class?
  • Do we inject only a piece of information (be it a string, integer, data structure, or whatever) into the other class?

I don’t think there’s a hard and fast rule for this, but it’s probably safe to say that it’s better to inject just the data you need. But then this raises a question of how do prepare the data to inject into a given class?

  • Do you create a method in one class and pass it into another?
  • Do you pass a piece of private or protected information into it?

Then again, I think it depends on if anything has to happen to the information before it’s passed into a class.

Anyway, I could go back and forth on this for the rest of the post and never come to a conclusion so why not work through some source code until there’s something reasonable.

Continue reading

Preparing For Memberships and More

For the better half of at least a couple of years, I’ve blogged nearly every day of something related to WordPress. This may be something dealing with blogging, speaking, resources, programming, notes, or other various articles.

To say that writing is something I enjoy doing is an understatement, and being able to do it using software I like and on which we build solutions for others is something that isn’t something I don’t take for granted.

For those who read every day, you’ve likely recognized that I’ve not been posting as frequently as I normally do. Part of this is simply because life has gotten extremely busy. The other part of it has to do with what I’m planning to do with this site in the coming weeks.

Continue reading

WordPress Admin Notice Plugins (And Why Options Are Good)

A couple of days ago, someone shot me a link to Dobby (no the house-elf, but sorta – and it would’ve been just a bit cooler, right? :). In short, it’s one of the various WordPress admin notice plugins that I think is worth checking out.

WordPress Admin Notices

It’s written by Thorsten Frommen (who inspired this post, to be honest) and a developer for whom I have a lot of respect.

The plugin’s description is as follows:

Dobby, the friendly Admin Elf, takes care of all your (unwanted) admin notices.

The emphasis added is mine, but it sounds a little familiar, doesn’t itThe drama.

Or not. 🙂

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑