Tom McFarlin
Tom is a self-employed developer who loves writing, building, and sharing WordPress-based projects. He runs Pressware where he provides WordPress goods and services. You can follow him on Twitter.
  • Code
    The WordPress Coding Standards: An IntroductionThe wordpress coding standards
    When it comes to building WordPress-based products, we're somewhat cursed (or blessed, depending on how you see it), with a double-edged sword: Because WordPress is written in PHP, it's relatively easy to get WordPress - or the project itself - to do whatever it is we want to do all the while avoiding best practices. But this raises the question: What's the point of an API or formal coding standards if we're simply going to ignore them? We've written quite a bit about the WordPress APIs in previous articles, and we've touched on the WordPress Coding Standards, but we've never really taken a deep dive into the coding standards, understanding each aspect of them, and why they matter. So in this series, we're going to be doing just that.Read More…
  • Code
    Design Patterns in WordPress: We're Just Getting StartedDesign patterns in wordpress
    Throughout this series, we've been taking a look at a few design patterns and how they are applicable to software development - specifically WordPress development. The thing about design patterns is that there is a wide variety of them and it would be near impossible to do justice to each of the patterns in a series here on the blog. Nonetheless, hopefully taking a look at these three have helped kickstart your interest in using design patterns in your work.Read More…
  • Code
    Design Patterns in WordPress: The Simple Factory PatternDesign patterns in wordpress
    In this series, we're taking a look at design patterns and how we can leverage them to our advantage when building products on top of WordPress. The nice thing about design patterns is that they aren't explicitly limited to themes or plugins - they are handy in a variety of different scenarios. It's simply a matter of being able to identify which patterns are applicable to certain scenarios.Read More…
  • Code
    Design Patterns in WordPress: The Singleton PatternDesign patterns in wordpress
    Throughout this series, we're taking a look at the significance of design patterns and the roles that they play in WordPress development. In the first post in the series, we took a high-level survey and even reviewed the Observer Pattern to see how it's possible to register various functions or objects with certain events that occur within the lifecycle of an application. In this post, where's going to take a look at the Singleton Pattern.Read More…
  • Code
    Design Patterns in WordPress: An IntroductionDesign patterns in wordpress
    For those who have an extensive background in software engineering, design patterns should be familiar territory; however, there's an entire group of developers - especially in the web development community - who aren't necessarily familiar with design patterns (even though they've likely used them!). In this series, we're going to take a look at design patterns, specifically in the context of WordPress, how they're useful, and some practical examples that we can use in our themes and plugins.Read More…
  • Code
    Developing Plugins With a Distributed TeamDeveloping plugins with a distributed team1
    Recently, I had the opportunity to build a plugin with two other developers - Pippin Williamson and Andrew Norcross. We came up with the idea via Twitter, scoped it via email, and built it using GitHub using its tools all prior to releasing it.Read More…
  • Code
    A Beginner's Guide to Enqueuing jQueryA beginners guide to enqueuing jquery1
    One of the best things about WordPress is its vibrant economy. For many users, it's trivially easy to find themes to fit the design for which they're aiming, or to find plugins that provide functionality that they want to introduce into their site. But how many of you - as developers or designers - have a received that phone call or that email in which the customer claims that something is wrong with their site only to discover that the browser console displays something about an error having to do with JavaScript or jQuery?Read More…
  • Code
    Cross-Site Scripting in WordPress: Practical Tips for Securing Your SiteCross site scripting in wordpress what is xss
    In this series, we're taking a look at how to secure our WordPress projects from XSS - or cross-site scripting. In the first article in the series, we defined what cross-site scripting actually is, understanding how it works, and why it's dangerous. We also spent some time discussing how this impacts our day-to-day WordPress development efforts and what we can do about it. Although there are some functions that WordPress has available to help validate and sanitize data, there is more work that we can do in order to secure our projects. In this final article, we're going to take a look at some practical tips that we can follow and some tests that we can administer to secure our work against XSS attacks.Read More…
  • Code
    Cross-Site Scripting in WordPress: What Is XSS?Cross site scripting in wordpress what is xss
    One of the most exciting aspects of modern web development is the potential that comes with building applications specifically for web browsers (or to run "in the cloud.") Originally, Java was meant to be the "write-once, run-anywhere" solution, but it appears that the web has become the perfect medium for that. Who would've thought, right? But along with the various browsers that we have available, the technologies that we can leverage, and, quite simply, the neat things we can do, there's still a dark underbelly to web application development - cross-site scripting. And considering that WordPress is a web application on which many of us build for fun, profit, or to make a living, it's a topic that we shouldn't avoid especially if we want to have the most robust products possible. In this two part series, we're going to take a look at what cross-site scripting really is, its dangers, how it impacts WordPress development, and then practical steps that we can take for testing our themes and plugins.Read More…
  • Code
    Incorporating the jQuery Date Picker Into the Post Editor: Save the DateDatepicker
    In this series, we are working on a plugin for the simple purpose of introducing a jQuery date picker into the post editor using a post meta box and then displaying it on the site front end. Rather than do an extensive, detailed series on a deep topic in WordPress - the purpose of this series is to focus on a very niche topic.Read More…
  • Code
    Incorporating the jQuery Date Picker Into the Post Editor: Preparing the PluginDatepicker
    We cover a lot of topics on this blog - anything ranging from something as simple as how to include and require template files in WordPress projects to something such as an entire series on the Settings API, but I think there's always room to cover a straightforward How-To that covers a single, specific task within the context of WordPress. So, in this two-part series, we're going to take a look at how to introduce a jQuery date picker into our post editor so that we can associate a date with a given post.Read More…
  • Code
    Strategies for Supporting WordPress PluginsWpplugins
    As a WordPress developer - specifically for plugins, in this case - determining the best way to provide support for your work can be a challenge. In fact, I'm currently in the process of evaluating what may be the best route for my current set of plugins, so this topic hits close to home. As such, I thought it would be a relevant topic to share and discuss with the Wptuts+ community. So in this article, I want to take a look at the problems that exist with supporting WordPress plugins, some of the current models for supporting WordPress plugins, and then initiate a discussion in the comments about the various options outlined here (as well as those that aren't covered).Read More…