Categories
Code

Preparing for WordPress 4.4 comment form changes

As detailed on the Make WordPress blog, the order of comment fields will change in WordPress 4.4, scheduled for a December 2015 release.

This may affect your theme if the comment form doesn’t use the typical layout of one field above the other.

Preparing your theme for the release of WordPress 4.4 will require your CSS allow for two version of the comment form: comment field last (current) and comment form first (future).

Categories
Code

Responsive Web Design MVP

This is not another responsive web design equals web design post. That particular debate is largely answered every time an m-dot link is shared on Twitter or Facebook.

Ethan Marcotte’s landmark A List Apart article defined responsive web design as having three technical ingredients:

  • fluid grids
  • flexible media
  • media-queries.

It’s often argued that modern responsive web design requires more than these three ingredients.

Categories
Code

WordPress 4.2.3 and the benefit of time

WordPress 4.2.3 has reminded me why being conservative with enhancements is a good thing. If a bug is committed, you lose the benefit of time to fix it.

WordPress 4.2.3 has broken some sites using shortcodes in HTML tag attributes. As part of a security fix, certain ways of doing this are no longer possible.

Categories
Quick Notes

Live objects in Chrome’s console.log

It’s quite well known that passing an object in JavaScript passes a memory reference.

It turns out when logging nested objects to the console in Chrome, Chrome logs the reference to any nested objects rather than taking a deep snapshot. Which can make debugging more difficult, to say the least.

console-log-odd

Categories
Opinion

To hell with bad email software

The current state of email clients is such that responsive email is considered one of the most difficult tasks in web-development. It’s time to force the hand of email client developers.

In 2001 Jeffrey Zeldman wrote:

[Web] standards have been around for years. Browsers that support them have been around for six months to a year. If not now, when?

It typically takes 18 months or longer for web users to upgrade their browsers. Many still use browsers, like Netscape 4, that date back to 1997. These folks will only upgrade if we give them a reason to do so.

To hell with bad browsers, A List Apart

Categories
Code

Unobtrusive Comment Reply JavaScript for WordPress

I’ve decided to rewrite the JavaScript in the comment-reply.js file used on the front-end of WordPress sites with threaded comments enabled. The version included in WordPress uses inline events, I’m rewriting it to be unobtrusive.

I’ll be submitting a patch back to WordPress core once it’s done. It’s available as a plugin if you want to start running it on your site early.

Categories
Code

Removing Google Analytics referrer spam

Referrer spam is one of the more frustrating developments on the web in recent years. The premise is simple enough, a site owner sees a new referrer in their analytics and visits the website in question to investigate the source of new traffic.

The page in question does not contain any such links and instead advertises anatomical enhancements or attempts to install malware on the visitor’s computer.

Of the top ten referrers to my site in Google Analytics, seven are spammers. It’s an annoyance more than anything, all the same I’m trying a technique to kill it dead once and for all.

Categories
Quick Notes

A List Apart, an update on diverse authors

A List Apart have published an update on their efforts to become a more diverse publication.

Over the past year, we’ve started discussing inclusivity constantly, across every facet of our work—the authors we encourage, the messaging on our website, the people we invite to events, the way we edit articles, the topics we cover.

And yet, we screw up constantly. We cringe when we notice too late that we published an article with a biased example, or used words that defaulted to male. We struggle to include more people of color and non-native English speakers in our pages. We hear that our submissions copy feels alienating.

It’s a refreshing to read editor Sara Wachter-Boettcher be so upfront about what they’re doing; what they’re getting right and getting wrong. Go read it.

Categories
Talks

WordCamp Brisbane

I had the pleasure of speaking at WordCamp Brisbane recently. The video and my slides are below, following the slides are links to the resources mentioned in my talk.

Categories
Code

Plugin dependencies in WordPress, a user’s perspective

Ryan McCue has started a discussion around plugin dependencies in WordPress, Gary Pendergast has responded. Ryan thinks it needs to be solved, Gary doesn’t – but if he did, would solve it a different way.

As a user, I don’t want to be exposed to security issues in orphaned code.

Each of them go into some technical details, some of which I understand, others which go over this front-end developers head. I was going to leave the following as a comment on Gary’s post, but it strayed a little off topic so I decided to post it here: