Skip to content

Instantly share code, notes, and snippets.

John Blackbourn johnbillion

View GitHub Profile
@johnbillion
johnbillion / gist:0c75d86169373041259f8af802ec06a6
Created Jul 21, 2020
BMW E39 M5 (MSS52) INPA error codes
View gist:0c75d86169373041259f8af802ec06a6
1 Fuel Pump Relay
2 Idle Speed Actuator- Closing Coil
3 Fuel Injector Cyl 1
4 Fuel Injector Cyl 3
5 Fuel Injector Cyl 2
7 Intake Cam Position Sensor Bank 1
8 Intake Cam Position Sensor Bank 2
9 Knock Sensor- Cyl 1-2
10 Exhaust Cam Position Sensor Bank 1
@johnbillion
johnbillion / hierarchy.php
Last active May 9, 2020
ASCII WordPress Template Hierarchy
View hierarchy.php
<?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.
@johnbillion
johnbillion / wp_mail.md
Last active May 6, 2020
WordPress Emails
View wp_mail.md

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

View add_menu_page.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
atomic-blocks
caxton
coming-soon-blocks
cosmic-blocks
drop-shadow-boxes
ecwid-shopping-cart
editor-blocks
elegant-blocks
embedpress
enhanced-blocks
View gist:4fa3c4228a8bb53cc71d
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)
@johnbillion
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
View template-part-block-renderer.php
<?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 / install-debug-bar-extensions.sh
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
View install-debug-bar-extensions.sh
# wp-cli: http://wp-cli.org/
wp plugin search debug-bar --field=slug --format=csv --per-page=50 \
| grep -F 'debug-bar-' \
| xargs -n 1 wp plugin install
View merge.sh
#!/bin/bash
REV=$1
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 ""
pbpaste
@johnbillion
johnbillion / gist:5225514
Last active May 29, 2019
Post Meta Revisions
View gist:5225514
<?php
/*
Plugin Name: Post Meta Revisions
Description: Revisions for the 'foo' post meta field
Version: 1.0
Author: John Blackbourn
Plugin URI: http://lud.icro.us/post-meta-revisions-wordpress
*/
You can’t perform that action at this time.