Skip to content

Instantly share code, notes, and snippets.

@samargulies
samargulies / plugin-deploy.sh
Created October 26, 2011 17:34
Bash script to deploy a WordPress plugin git repository to the plugin directory
#! /bin/bash
# Update a WordPress plugin from git
# Based on scripts from thenbrent (https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh) and scribu (https://gist.github.com/1125050)
# main config
SRC_DIR=$(pwd)
DIR_NAME=$(basename "$SRC_DIR")
SVNUSER="gluten"
SVNPATH="/tmp/$DIR_NAME"
SVNURL="http://plugins.svn.wordpress.org/$DIR_NAME/"
@samargulies
samargulies / oembed-hotfix.php
Created October 13, 2011 17:09
Vimeo oembed hotfix
<?php
/*
Plugin Name: Vimeo oembed hotfix
Plugin URI:
Description: Enable https vimeo embeds. <strong>Note</strong>: If for any reason videos are not embedding properly, simply deactivate, and then reactivate this plugin.
Author: gluten
Version: 2.0
Author URI: http://belabor.org/
*/
@samargulies
samargulies / gist:1146907
Created August 15, 2011 14:50
Add a Network Admin link to the Admin Bar
<?php
/**
* Add a Network Admin link to the Admin Bar.
*/
function network_admin_adminbar() {
if( is_super_admin() ) {
global $wp_admin_bar;
@samargulies
samargulies / gist:1132127
Created August 8, 2011 16:36
set all WordPress imported authors to default
jQuery('#authors li select').each(function(){ jQuery(this).find('option[value="0"]').remove() });