Return Data not HTML

Functions and methods should return data structures, not rendered HTML. Returning HTML encourages early escaping, HTML parsing, and mixed data processing and output. These are all security and performance issues. What Could Go Wrong? Assembling and handling strings of HTML complicates things as you’re no longer dealing directly with the data, but a particular form […]

WordCamp Food

Lunch can be stressful for any WordCamp organiser, but there’s a major issue that’s trivially easy to fix that’s gone unnoticed. What’s for lunch? Different people have allergies and dietary requirements, but lunch can be a stressful and anxious situation for all attendees. For example, lunch at the first WordCamp Europe was a mound of unlabelled […]

WordPress and Composer TLDR

There’s a few questions I’m commonly asked about using composer + WordPress. Here they are in a super short form FAQ: To install a composer project, run: composer install To update a composer project, run: composer update Install WordPress in a folder composer require johnpbloch/wordpress @stable or in your composer.json add: { “require” : { “johnpbloch/wordpress”: “@stable” […]