Skip to content

Instantly share code, notes, and snippets.

@johnbillion
johnbillion / gist:5225514
Last active May 29, 2019 12:56
Post Meta Revisions
<?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
*/
@johnbillion
johnbillion / plugin.php
Last active November 20, 2017 22:05 — forked from joncave/plugin.php
First pass at removing the vulnerabilities from this plugin. Untested. *bites nails*
<?php
/* Plugin Name: Damn Vulnerable WordPress Plugin
* Description: Intentionally vulnerable plugin for plugin author education
* Version: 0.1
* Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/
* Author: Jon Cave
* Author URI: http://joncave.co.uk
* License: GPLv2+
*
* DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE
@johnbillion
johnbillion / gist:11369697
Created April 28, 2014 11:58
zzmag contributors
@johnbillion: 14
@negatendo: 7
@karlfreeman: 5
@torrez: 5
@notch: 2
@boonych: 2
@mikesten: 1
@cityofprogress: 1
@darrenux: 1
@jansru: 1
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 / 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.
@johnbillion
johnbillion / wp_mail.md
Last active May 12, 2024 14:19
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

#!/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 / install-all-languages.sh
Created February 18, 2017 20:12
Install all available languages on a WordPress site with WP-CLI
wp core language list --field=language | xargs -n 1 wp core language install
@johnbillion
johnbillion / install-popular-themes.sh
Last active February 27, 2017 14:59
Install all the "Popular" themes from WordPress.org using wp-cli and jq
@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