Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 332 of 427)

Defining a Custom WordPress Menu Hook

When it comes to defining custom option pages, theme pages, menu pages, and submenu pages, the provided API makes this trivially easy; however, one of the less used aspects of these functions is the ability to define a custom WordPress menu hook.

For example, in a recent project I needed to do exactly that when adding a submenu to the WordPress Tools menu so I thought I’d share my process for doing exactly this.

Note that if you’re looking to add a submenu to a different WordPress menu, then there are a couple of options that are available. First and foremost, the most common option is to use add_submenu_page and then use tools.php as the parent slug as specified in the Codex.

But if you happen to be working with the Tools menu, then the add_management_page function is your best bet because it’s designed for exactly that.

So for this article, that’s what I’ll be using.

Continue reading

My Thoughts on Finding The Next Steve Jobs

Throughout the year, 8BIT tries to read through several books in order to find the things that can help make us a better team. This past past weekend, I read through Finding The Next Steve Jobs as it was the book that was next in our line-up.

At the end of this post, I’ll share all of the parts that I highlighted while reading the book, but I first want to share my personal takeaways from the material in the book.

Generally speaking, I enjoyed it. It reminded me a lot of Rework in which the book is primarily made up of a number of very small chapters each of which has a single point that it attempts to make. Of course, they’re different books with different tones and it’s not really fair to compare them.

So with that said, I thought I’d go ahead and share some of my personal take aways from the book.

Continue reading

My Day-To-Day: Blog Every Day

In recent months, I’ve received a few tweets, questions, and emails asking my strategy for how I blog every day. The truth is that I hesitate to answer this question because I think that so much of being able to do so has to do with each of our personalities.

For example, some of the most creative people I know can’t stand schedules, timelines, certain forms of organization, and what not – simply put, they find inspiration in the chaos.

This isn’t to say that I consider myself creative in the sense that many artists and designers are, but I think that we all have some form of creativity within us, but I digress on this point for now.

On the other hand, I’m one of those that tends to be more rigid with my time management. I try to have guardrails setup for social media, I like making lists, I think there’s something to be said about writing every day even if it’s not blogging, and I tend to “go dark” when I really need to focus on a certain task (and this is true both online and offline – just ask my wife!).

But if I had to generalize some tips on how to blog every day regardless of your personality, it would boil down to the following three points.

Continue reading

PHP Code Formatter For Maintaining Cleaning Source Code

One of the biggest hurdles that I’ve experienced when working with pull requests in some of the projects I have on GitHub is the use of tabs and spaces and how they impact how code appears on the landing page.

Naturally, code should be well-formatted and easy to read not only for those who are simply investigating the project but also who are contributing to it.

Though I’ve shared a few plugins specifically for Coda on how to automate this, but we all use different editors, have different formatting techniques, and so on. The thing is, there’s not much we can do about how others configure their editor.

But here’s the thing: I think that if you’re the one in charge of a project, you have the responsibility of making sure that all merged code is easy to read and easy to manage.

Just as we have linters for various languages, we also have code formatters for different languages. Last week, I discovered PHP Formatter which is a really solid web application that serves as a solid, ahem, PHP code formatter.

Continue reading

Three of My Favorite Coda Plugins For WordPress

As I’ve previously mentioned, I use Coda as my IDE for WordPress development. Honestly, it lacks a lot features that I miss about IDE’s like Visual Studio, but I’m a fan of the user interface and have found a number of Coda Plugins for WordPress that make it more a pleasant experience.

To that end, there are a number of plugins that I’ve added to Coda that enhance the overall development experience for WordPress and that I’ve found make it much easier to resolve some of the common problems that arise when writing WordPress-based code while trying to stay true to the coding standards.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑