Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 85 of 427)

Developing Plugins and Themes Against WordPress Trunk

When developing plugins or themes for WordPress, one of the strategies that I often recommend is doing so against trunk (or the current snapshot of the code) of WordPress.

For those who are more experienced developers, you’re already on the up-and-up on the lingo and the caveats that come with doing this. But if you’re someone who is looking for ways to better their development practices, then perhaps this will help.

Remember that because WordPress is open source software, you can view the source code on the web at anytime.

Developing Against WordPress Trunk: trunk

Not only that, but you can download it to your local computer and work with it, as well. This will require certain pieces of software, and I’ll get into that momentarily; however, the ultimate purpose of this post is to talk about:

  • how to work with the current snapshot of code with WordPress,
  • how and why it may be beneficial to use this codebase when working on projects for others.

As stated above, there are caveats for doing this, and sometimes it’s a good idea to use the latest stable version of the codebase. And I’ll address that later in the article, as well.

Continue reading

Installing PHPUnit in Visual Studio Code

Once you’ve got the PHP Coding Standards set up in Visual Studio Code, I think it’s also important to make sure that you have PHPUnit installed so that you get in the practice of writing testable code.

If you wait to start doing this until after you’ve started a project, you’re far less likely to start doing it. I’m saying this both from experience and from working with other developers.

So before I start covering how to handle front-end linting and things like that, I want to walk through the process of setting up PHPUnit. If you’ve not yet read how we’re managing packages or how we’re using Visual Studio Code, I recommend catching up by reading the following articles:

  1. A WordPress Development Environment (Using a Package Manager)
  2. An IDE for WordPress Development
  3. Working with User Settings in Visual Studio Code

Once you’re caught up, head back to this post.

Continue reading

Scheduled Post Shortcut 1.5.0

I first released Scheduled Post Shortcut for WordPress almost two years ago (officially, it’ll be two years ago this June but who’s counting, right? 🙂).

It’s one of those really simple plugins that works well for those who schedule content far out and want to easily see how many posts are in their backlog, but not much else.

Scheduled Post Shortcut 1.5.0

In short, it’s a plugin designed for people who blog regularly and frequently.

Anyway, I had a notice on the project page in the WordPress Plugin Repository that the plugin had not been tested against the lastest version of WordPress.

So while making sure it was compatible against WordPress 4.9.4, I also brought it up to date with some other standards.

Continue reading

Using PHP Coding Standards in Visual Studio Code

So we’ve got the basics set up in Visual Studio Code set up, but we don’t have any practical tools installed to help us with more of the professional side of writing code.

Of course, “professional” can be defined based on the company, team, or environment in which you’re working. For this series, I’ve opted to go with WordPress as the foundation. But that still leaves things such as:

  • coding standards,
  • JavaScript linting,
  • package management,
  • And so on.

And throughout the series, I’m going to cover everything listed above. But to do so, I’m going to cover each component one-by-one.

Today’s post is going to focus on the PHP coding standards. I’ve written plenty of material regarding the WordPress Coding Standards, but in the last year or more, I’ve begun to work more with PSR, and so that’s what will be covered in this post.

As a side note, know that much of what is covered can be translated to the WordPress Coding Standards should you so choose, and it’s going to be clear as to where you’d make the changes.

With that said, let’s get started.

Continue reading

The First Social Media Sabbatical of 2018

A couple of years ago, I started time a little bit of time off of social media here and there just to see what it was like (mainly because it had become such a staple in our lives). I wrote about this a bit last summer, too.

Then, back in December, I took the month off of pretty much every social network of which I was a part and thoroughly enjoyed the time away. But it wasn’t because of anything such as removing myself from something bad.

In fact, it just gave me (that is, not you or anyone else, but for me), room to think.

This isn’t to say I don’t enjoy hanging out with those of you I chat with online on a near-daily basis because I do, nor am I say that using social media is bad because I don’t think it’s an all or nothing thing.

But I do think that there is something to having a social media sabbatical now and again whenever it’s needed. And I’m personally at that point right now.

I know I’m not the only one who deals with this kind of stuff because I’ve talked with enough people to know. So I thought I’d write, again, about it, why I’m doing it, and what I plan to do with the time off.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑