Skip to content

Instantly share code, notes, and snippets.

@clubdeuce
clubdeuce / wp_auto_updater
Last active December 15, 2015 07:39
Based on Jeremy Clark's (jeremyclark13) automatic-theme-plugin-update, this is the code encapsulated as a class. Simply instantiate the class using the api_url and plugin slug as contructor parameters.
<?php
/**
* the auto updater class. This is based on Jeremy Clark's (jeremyclark13) automatic-theme-plugin-update. Thanks, Jeremy.
*
* @package Plugin Auto Updater
* @author Daryl Lozupone <dlozupone@renegadetechconsulting.com>
* @version 0.1
* @since 0.1
*/
@clubdeuce
clubdeuce / gist:5811516
Created June 19, 2013 03:35
Codeship configuration for WP unit testing
curl http://cs.sensiolabs.org/get/php-cs-fixer.phar -o php-cs-fixer.phar
curl -s http://getcomposer.org/installer | php
php composer.phar install --dev --no-interaction --prefer-source
mkdir -p build/logs
mkdir -p build/cov
#phpUnit setup
export WP_VERSION=3.5.1
export WP_MULTISITE=0
mkdir -p /tmp/wordpress
export WP_CORE_DIR=/tmp/wordpress/
@clubdeuce
clubdeuce / singleton.php
Last active August 29, 2015 14:20
Singleton base class
<?php
class Singleton
{
/**
* Returns the *Singleton* instance of this class.
*
* @staticvar Singleton $instance The *Singleton* instances of this class.
*
* @return Singleton The *Singleton* instance.
*/