Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 212 of 219)

Articles, tips, and resources for WordPress-based development.

How I Organize My Files When Developing WordPress Plugins

So much of software development consists of actually maintaining projects after they’ve been released. Unfortunately, that’s where a lot of time is actually spent refactoring that didn’t necessarily have to occur if more planning had been done from the outset of the project.

Sure – some teams get this right, some teams don’t, and sometimes it’s just the nature of bad luck. After all, the best we can do is try to make the smartest decisions possible given the initial requirements.

When it comes to building plugins, there’s a specific way that I organize my WordPress plugin files that I’ve found to make bug fixes, future updates, and overall development much easier as a the lifetime of a plugin increases.

Continue reading

How To Add Custom User Meta During Registration

I’m currently working on an application that requires users to register before logging into the site. The application is based on WordPress, but the registration process is using a custom template and requires some extra information.

As an example, I thought I’d share how I’m programmatically creating a user during the registration process, adding extra information to the user’s profile, and then displaying it in the user management dashboard.

Continue reading

Understanding WP_Query

I’ve done my fair share of work with WP_Query this week – it’s definitely been an exercise in education, but when an employee of Automattic comments and offers advice, it’s worth listening

But I wanted to keep the conversation going for the benefit of other developers.

As such, I wanted to reblog this talk by lead WordPress developer and Audrey Capital technologist Andrew Nacin in which he discusses the various topics surrounding WordPress queries, hooks, and so on in order guide others in understanding WP_Query.

Continue reading

How To Unit Test WordPress Settings API Validators

For those who are experienced with the Settings API, you may wish to skip down to the core problem.

How To Unit Test WordPress Settings API Validators

I’m currently building a web application where WordPress is serving as the core framework. I’ve discussed this before and Matt covered this in State of the Word 2012 as something that will become more common as WordPress grows in popularity.

So WordPress doesn’t necessarily have an MVC or MVVM or whatever design pattern, but it offers its own method for how data models, business logic, and other necessary components should be created.

I’m using the Settings API to create a model that represents a user in the application. Essentially, it will wrap the core WordPress user model, but I have to introduce some additional attributes and ultimately create relationships with other models that WordPress doesn’t natively support.

Anyway, I’m writing unit tests for everything that’s going into the application and I hit an interesting point when it came to unit testing the validation functions.

Continue reading

Why I Contributed To Easy Digital Downloads, What I Learned, & Why You Should, Too

Easy Digital Downloads

At the risk of sounding like a marketer rather than a fan and contributor of the plugin, Easy Digital Downloads is a free plugin for WordPress that makes it exceptionally easy to sell digital products through your WordPress-based site.

Though it’s available for download from the WordPress Plugins Repository, Pippin – the lead developer behind the plugin – open sourced the plugin on GitHub in order to get other developers involved.

This past weekend, I was able to contribute a couple of fixes. In light in the whole plugin conversion that’s going on within the WordPress Developer Community, I found several points worth mentioning with regards to getting involved with Easy Digital Downloads.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑