Tom McFarlin

Software, Development, and WordPress

Page 369 of 391

WordPress Widget Boilerplate

A few months ago, I contributed an article to WPTuts on Writing Maintainable WordPress Widgets. The motivation for this series was driven largely by the fact that as much as I love the WordPress community, there are more than a few poorly constructed plugins.

In some cases, this is fine. If you’re planning to quickly throw something together with no plans to continue development after its initial release, you can probably get a way with throwing something functional together.

But if you’re looking to build a plugin that you’ll be maintaining over time, then I believe applying good software development practices is a must. That is, I think that developers should follow the platform’s API, use design patterns where applicable, and clearly organize their files.

Continue reading

Create a WordPress Upload Meta Box

This post was updated on March 22, 2013. Please review the code changes below.

WordPress makes it pretty easy to capture additional information with your posts through the use of custom meta boxes. Adding checkboxes, select options, textareas, radio buttons, and other input elements are easy.

But giving users the ability to upload files from a post screen requires a little more work.

If you’re not interested in tapping into the Media Uploader, then here’s how you can programmatically create a WordPress upload meta box.

Continue reading

« Older posts Newer posts »

© 2020 Tom McFarlin

Theme by Anders NorenUp ↑