Skip to content

Instantly share code, notes, and snippets.

@johnbillion
johnbillion / alphas.csv
Last active November 28, 2020 22:49
Git commit hashes for the first alpha of each version of WordPress in the master branch
Version Commit Date
5.6 7aae3c7bbf02aed99012a4925ce610fc94c70272 2020-07-28
5.5 55b3866749c642f5d5b2e6dfc57605ad31bdb820 2020-03-04
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
@johnbillion
johnbillion / roles.sh
Created November 22, 2017 00:19
Create a user account for each role on your WordPress site
# wp-cli: http://wp-cli.org/
wp role list --fields=role --format=csv \
| tail -n +2 \
| xargs -I {} wp user create "user-{}" "{}@example.com" --role={}
@johnbillion
johnbillion / hierarchy.php
Last active June 22, 2023 23:05
ASCII WordPress Template Hierarchy
<?php
/*
WordPress Theme Template Hierarchy Last updated for WordPress 5.4
==================================
This diagram is partially simplified for legibility. To view the complete template hierarchy in use on your site see the
Template panel in the Query Monitor plugin.
<?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
johnbillion / wp_mail.md
Last active January 27, 2024 14:06
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: https://github.com/johnbillion/wp_mail

INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)