Skip to content

Instantly share code, notes, and snippets.

@shadyvb
shadyvb / example.php
Created April 2, 2016 17:55 — forked from westonruter/example.php
Some code we're using at XWP to make plugins easier and cleaner to write.
<?php
require_once __DIR__ . '/pluginception.php'
class ShoutPlugin {
use Pluginception;
function __construct() {
/*
* This method comes from the Pluginception trait,
# vagrant vsftp and other tricks
# from: https://ttboj.wordpress.com/2013/12/21/vagrant-vsftp-and-other-tricks/
# and
# Vagrant clustered SSH and 'screen'
# from: https://ttboj.wordpress.com/2014/01/02/vagrant-clustered-ssh-and-screen/
# for use inside a ~/.bashrc or similar
# copyright James Shubin, 2013, agplv.3+
### VAGRANT ###################################################################
# avoid needing to always add --provider=kvm
#!/bin/bash
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert
# Disclaimer: It might not bloody work
# Disclaimer 2: I'm not responsible for any screwups ... :)
# DB Variables
echo "MySQL Host:"
read mysqlhost
export mysqlhost