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 […]

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” […]