This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.require_version '>= 1.5.1' | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'roots/bedrock' | |
# Required for NFS to work, pick any local IP | |
config.vm.network :private_network, ip: '192.168.50.5' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Props to goddva: http://stackoverflow.com/questions/1361169/possible-to-add-data-to-the-body-of-a-http-request-using-curl-in-php | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "http://site.dev/webhooks.php?type=stripe"); | |
curl_setopt($ch, CURLOPT_USERAGENT, "My user agent"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_HEADER, 1); | |
curl_setopt($ch, CURLOPT_POST, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: wpMandrill MS | |
* Plugin URI: trepmal.com | |
* Description: Network-wide settings for wpMandrill. | |
* Version: 2013.04.01 | |
* Author: Kailey Lampert | |
* Author URI: kaileylampert.com | |
* License: GPLv2 or later | |
* TextDomain: wpmandrill-ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class WP_Admin_Notice { | |
public $class = ''; | |
public $message = ''; | |
function __construct( $message, $class = 'updated' ){ | |
$this->class = $class; | |
$this->message = $message; | |
add_action( 'admin_notices', array( $this, 'output' ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get other templates (e.g. product attributes) passing attributes and including the file. | |
* | |
* @access public | |
* @param mixed $template_name | |
* @param array $args (default: array()) | |
* @param string $template_path (default: '') | |
* @param string $default_path (default: '') | |
* @return void */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn | |
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo. | |
# main config | |
PLUGINSLUG="multisite-user-management" | |
CURRENTDIR=`pwd` | |
MAINFILE="ms-user-management.php" # this should be the name of your main php file in the wordpress plugin | |
# git config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Multisite */ | |
define('WP_ALLOW_MULTISITE', true); | |
define('MULTISITE', true); | |
define('SUBDOMAIN_INSTALL', true); | |
define('DOMAIN_CURRENT_SITE', 'somesite.com'); | |
define('PATH_CURRENT_SITE', '/'); | |
define('SITE_ID_CURRENT_SITE', 1); | |
define('BLOG_ID_CURRENT_SITE', 1); | |
define('MAJ_DEV', true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// So, I'm debating whether user_role should be defined as primary_user_role, | |
// and changed from maj_student to something like journal_host|journal_guest? | |
// that would mess up though what links are displayed in the navigation | |
// though... but that's inconsequential. there are other ways of determining | |
// how those would be selected/displayed. | |
// my journals | |
// if not a teacher, display this | |
// family/friends | |
// get_users and filter by family/friend role | |
// teachers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Okie doke. Need to process how to handle reciprocal connections, as well | |
// as determining when to add a user to blog as a certain type. For | |
// example, lets talk about students adding family friends as students. | |
// A student will invite another student as a family friend. It'll check to | |
// see if that user exists, if so, record their user id and email an | |
// invitation to that user. The user will then accept the invitation. On | |
// invitation acceptance, when it goes to add the student to the journal | |
// hosts journal, it'll check to see if the current user ( journal guest ) | |
// is a student. If so, it'll also add the journal host to the journal | |
// guests' journal as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class Cur_Abstract { | |
public static $instance; | |
public static function get_instance() { | |
// Instead of doing is_object( static::$instance ), we check to see if | |
// static::$instance is an instance of static::$class. Because we're | |
// extending the class, static::$instance wants to be shared across any | |
// classes that extend Cur_Abstract, muddling up this check. If it were |