Tom McFarlin
Tuts+ Editor, Owner and Lead Developer at Pressware
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
    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…
  • Code
    Developing Plugins With WordPress Boilerplates: Building a PluginDeveloping plugins with wordpress boilerplates building a plugin
    In the first article of this series, we looked at how a boilerplate can improve your development efforts by providing a foundation off of which your project can be built. Ideally, boilerplates should provide just enough of a framework to get started while letting you focus on the specific business logic, core need, or domain-specific code that you need to write. Specifically, we took a look at the WordPress Widget Boilerplates and the WordPress Plugin Boilerplate. In this post, we're going to take advantage of the Plugin Boilerplate to write our own plugin in order to see how Boilerplates both lay the foundation for writing good code, and how we can use it as a starting place for our future work.Read More…
  • Code
    Developing Plugins With WordPress Boilerplates: Why Boilerplates MatterDeveloping plugins with wordpress boilerplates why boilerplates matter
    Over the past five to ten years, building sites and applications for the web has become much more complex than much of the stuff that people were building in the 90's. Long gone are manually creating sites using uppercase HTML, table-based layouts, and ugly JavaScript to make some type of cute animation happen on a page. Now we've got a variety of technologies, frameworks, and languages all of which work together to help us build full on software applications that run within a browser.Read More…