Skip to content

Instantly share code, notes, and snippets.

View simonwheatley's full-sized avatar

Simon Wheatley simonwheatley

View GitHub Profile
#!/bin/bash -e
#
echo "Hello Simon"
say "Hello Simon"
@simonwheatley
simonwheatley / LICENSE.md
Created January 8, 2016 12:02
Add GitHub repo collaborators

The GNU General Public License, Version 2, June 1991 (GPLv2)

Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

@simonwheatley
simonwheatley / fieldmanager-babble-poc.php
Last active August 29, 2015 14:27
A proof of concept for creating a custom translation UI for a Fieldmanager field group utilising repeatable fields
<?php
/*
Plugin Name: A8c VIP Translatable Fields Test
Version: 1.0b1
*/
// Code pasted from Fieldmanager site
// using Fieldmanager for a slideshow - any number of slides,
// with any number of related links
@simonwheatley
simonwheatley / babble-demo.php
Created June 9, 2015 19:12
Demo of a plugin adding two fields in a meta box, one of which is synced and one translated
<?php
/*
Plugin Name: Babble Demo
Description: Demo to show translating (or not) post meta
Version: 1.0
Author: Automattic
Author URI: https://automattic.com/
License: GPL v2 or later
This program is free software; you can redistribute it and/or modify
@simonwheatley
simonwheatley / remove-genericons-example-html.sh
Last active August 29, 2015 14:20
Remove all files called example.html and containing the string "<title>Genericons</title>". Usage: `./remove-genericons-example-html.sh /path/to/site/`
#!/bin/bash
#
# Remove all files called example.html and
# containing the string
# "<title>Genericons</title>
#
# Copyright Automattic Inc, 2015
#
# This script is free software, and is released under the
# terms of the GPL version 2 or (at your option) any
@simonwheatley
simonwheatley / gist:a3be131e0118f9bef324
Created April 14, 2015 19:42
Adapt Automattic/syndication to just use WP_RSS and make life easier for users
<?php
/**
*
*
* @package
**/
class GlowSyndication {
/**
#!/bin/bash
# Takes a composer controlled repo and pushes a
# composed PACKAGE into a branch called "PACKAGE".
(
# SANITY CHECKS
# Check for uncommitted changes, and refuse to proceed if there are any
if [ -n "$(git ls-files . --exclude-standard --others)" ]; then
@simonwheatley
simonwheatley / get_field_key
Created January 27, 2014 09:53
Getting an Advanced Custom Fields field_key from a field_name and field_group.
/**
* Get a field key from a field name. Why isn't this an
* ACF API function?
*
* @param string $field_group The name of the field_group to search
* @param string $field_name The name of the field to find a key for
* @return string|bool The field key if found, else false
*
* @author Simon Wheatley
**/
@simonwheatley
simonwheatley / .gitignore
Last active December 26, 2015 21:58
Amazing script from Matt Reed, to prompt me to log my time.
Simon Log.app
@simonwheatley
simonwheatley / automattic-updater.php
Created August 29, 2013 17:01
Get updates to Automattic code from GitHub
<?php
/*
Plugin Name: Automattic Updater
Description: Get updates to Automattic code from GitHub
Version: 1.0
Author: Code for the People
Author URI: http://codeforthepeople.com/
Copyright © 2013 Code for the People Ltd