A Short Interview on WordPress JavaScript Coding Standards

Last week, I shared that I published the first iteration of the WordPress JavaScript coding standards.

Above all else, this was meant to be a first draft – a 1.0 – of the standards in order that we may all begin collaborating to refine the standards.

Generally speaking, it’s been well-received: I’ve received some good comments and questions via Twitter, and some developers have already made their own additions to the Codex.

Last week, I gave a short interview on WordPress JavaScript coding standards with my team at WP Daily.

Continue reading “A Short Interview on WordPress JavaScript Coding Standards”

Resolving WordPress jQuery Errors

WordPress jQuery Error

One of the biggest problems with writing and maintaining themes and/or plugins in WordPress is the frustration that comes with having to track down JavaScript errors.

Pippin Williamson has discussed this extensively on his blog, we’ve covered it on WP Daily, and I’ve talked about this once before here.

But since I’ve seen this issue crop up several times since, I wanted to offer some additional thoughts on this particular topic that has stemmed from the recent discussions.

Continue reading “Resolving WordPress jQuery Errors”

Five Suggestions For Writing Better JavaScript in WordPress

This is the final post in the series JavaScript in WordPress. Be sure to read the first article, too!

In the first post in this series, I briefly mentioned that there is a problem with writing JavaScript in WordPress. In boils down to the fact that people are writing JavaScript who don’t truly know jQuery (let alone JavaScript), and that there are lack of standards to follow.

And though I’m not interested in defining the coding standards for JavaScript in WordPress – at least not here – I am interested in sharing four things that I’ve found to be successful in writing maintainable jQuery in WordPress for both individual and team-based projects.

Note, of course, that these are geared towards jQuery. After all, that is WordPress’ JavaScript library of choice.

Continue reading “Five Suggestions For Writing Better JavaScript in WordPress”

The Problem of No Coding Standards For JavaScript in WordPress

This is the first post in the series JavaScript in WordPress. Be sure to read the final article, too!

JavaScript in WordPress

One of the challenges of building projects on top of WordPress is that there are well-defined coding standards specifically for PHP-based components. There are even some guidelines for HTML, and the CSS guide is under construction, but there appears to be very little in way of coding standards for JavaScript in WordPress.

I’m certainly not going to be defining those standards here – that belongs in the Core Contributor Handbook, right? – but I am doing to be sharing my thoughts on JavaScript in WordPress and some of the things that I do in order to make sure that my projects and that my team’s projects are maintainable over time.

Continue reading “The Problem of No Coding Standards For JavaScript in WordPress”