Skip to content

Instantly share code, notes, and snippets.

John Blackbourn johnbillion

Block or report user

Report or block johnbillion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View template-part-block-renderer.php
namespace Foo\Blocks;
* Generic block rendering callback function to load a block from a theme template part.
* Loads a block from the `blocks` subdirectory according to the name of the block, and places the
* block attributes and block content into namespaced query vars. If there's no corresponding block
* template part, the block content is returned unaltered.
johnbillion /
Created Nov 22, 2017
Create a user account for each role on your WordPress site
# wp-cli:
wp role list --fields=role --format=csv \
| tail -n +2 \
| xargs -I {} wp user create "user-{}" "{}" --role={}
johnbillion /
Last active Sep 18, 2019
Use WP-CLI to install a load of Debug Bar extensions (which work with Query Monitor too) in one go
# wp-cli:
wp plugin search debug-bar --field=slug --format=csv --per-page=50 \
| grep -F 'debug-bar-' \
| xargs -n 1 wp plugin install
johnbillion / alphas.csv
Last active Feb 3, 2020
Git commit hashes for the first alpha of each version of WordPress in the master branch
View alphas.csv
Version Commit Date
5.4 4b1dd6e54988776227f72507c72cd81a4b337004 2019-10-25
5.3 5640763da953c28033e9f285c7c2a1da4c613aa3 2019-05-02
5.2 6edf51566187f1bba6aa5d891a681b02996ccef4 2019-02-14
5.1 ddc67854a4828a8aa36fc049940fc2ba4bf0604e 2018-10-05
5.0 9f77ec13ffcf1ab14c8699fdb68e728709eb6bb5 2017-11-07
4.9 3c1dfef4ba5c8fe89b46c62f81395313c9814cf9 2017-06-01
4.8 26a28e6450496efc07b6b5fbc3383d3d5f17634a 2016-11-24
4.7 35c66918580f5ecfec1ec4c62feb93dae26d9b08 2016-08-02
4.6 65ec7e5d81f718ea305fe9ccf1b4dde76ee08280 2016-04-12
johnbillion /
Last active Feb 27, 2017
Install all the "Popular" themes from using wp-cli and jq
johnbillion /
Created Feb 18, 2017
Install all available languages on a WordPress site with WP-CLI
wp core language list --field=language | xargs -n 1 wp core language install
svn up --ignore-externals . > /dev/null
svn merge -c$REV ../../trunk .
LOG=$(svn log -r$REV ../../trunk | grep -v '\-------' | tail -n +3)
BRANCH=$(basename $(pwd))
echo -en "$LOG\n\nMerges [$REV] to the $BRANCH branch." | pbcopy
echo ""
johnbillion /
Last active Aug 30, 2019
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here:

johnbillion / hierarchy.php
Last active Feb 13, 2020
ASCII WordPress Template Hierarchy
View hierarchy.php
WordPress Template Hierarchy (as of WordPress 4.9)
is_404() -------------------------------------------------------------------------------------------------> 404.php
is_search() ----------------------------------------------------------------------------------------------> search.php
is_front_page() ------------------------------------------------------------------------------------------> front-page.php
is_home() ------------------------------------------------------------------------------------------------> home.php
You can’t perform that action at this time.