Skip to content

Instantly share code, notes, and snippets.

View sheabunge's full-sized avatar
😴

Shea Bunge sheabunge

😴
View GitHub Profile
@sheabunge
sheabunge / activate-plugin-after-install.php
Created May 18, 2013 04:41
Adds the option to activate a plugin only on the main site to the network admin plugin install screen
<?php
/*
* Plugin Name: Activate Plugin After Install
* Description: Adds the option to activate a plugin only on the main site to the network admin plugin install screen
* Plugin URI:
* Version: 2013.05.18
* Author: Shea Bunge
* Author URI: http://bungeshea.com
* Licence: MIT
* License URI: http://opensource.org/licenses/MIT
@sheabunge
sheabunge / vertical-centered.css
Last active December 17, 2015 03:48 — forked from LeaVerou/dabblet.css
Vertical centering with Flexbox
/**
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
*/
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
@sheabunge
sheabunge / only-in-feed.php
Created March 31, 2013 05:33
Adds a shortcode that will make the enclosed content either only display in the RSS feed, or hide it from the feed
<?php
/**
* Plugin Name: Only In Feed
* Description: Adds a shortcode that will make the enclosed content either only display in the RSS feed, or hide it from the feed
* Author: Shea Bunge
* Author URI: http://bungeshea.com
* Version: 1.0
*/
@sheabunge
sheabunge / allow-svg-upload.php
Last active December 15, 2015 15:09 — forked from ocean90/svg.php
Allows you to upload SVG files through the WordPress media uploader.
<?php
/**
* Plugin Name: Allow SVG Uploads
* Plugin URI: http://wordpress.stackexchange.com/q/94003/19726
* Description: Allows you to upload SVG files through the WordPress media uploader.
* Author: Shea Bunge
* Author URI: http://bungeshea.com
* Version: 1.0
*/
@sheabunge
sheabunge / mini-admin-bar.php
Created March 26, 2013 02:58
Makes the WordPress admin bar a small button on the left and expands on hover.
<?php
/*
* Plugin Name: Mini Admin Bar
* Plugin URI:
* Description: Makes the admin bar a small button on the left and expands on hover.
* Version: 1.0
* Author: Shea Bunge
* Author URI: http://bungeshea.com
* License: MIT
*/
@sheabunge
sheabunge / jquery-boilerplate.js
Created March 22, 2013 01:14 — forked from tommcfarlin/jquery-boilerplate.js
Demonstrates how to properly load jQuery within the context of WordPress-targeted JavaScript so that you don't have to worry about using things such as `noConflict` or creating your own reference to the jQuery function.
(function( $ ) {
"use strict";
$(function() {
// Your code here
});
<?php
/**
* Change Admin URL
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
@sheabunge
sheabunge / uninstall.php
Created January 13, 2013 05:03
WordPress multisite plugin uninstall
<?php
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
exit();
if ( is_multisite() ) {
$blogs = $wpdb->get_results( "SELECT blog_id FROM $wpdb->blogs", ARRAY_A );
if ( $blogs ) {
foreach ( $blogs as $blog ) {
switch_to_blog( $blog['blog_id'] );
@sheabunge
sheabunge / widget-shortcode.php
Created December 12, 2012 10:33
Easily insert any WordPress sidebar widget into a post or page using a shortcode. http://wp.smashingmagazine.com/2012/12/11/inserting-widgets-with-shortcodes/
<?php
/**
* Plugin Name: Widget Shortcode
* Plugin URI: http://wp.smashingmagazine.com/2012/12/11/inserting-widgets-with-shortcodes/
* Description: Easily insert any WordPress sidebar widget into a post or page using a shortcode.
* Author: Smashing Magazine
* Author URI: http://www.smashingmagazine.com
* Version: 1.0
*/
@sheabunge
sheabunge / custom-wp-email.php
Created November 23, 2012 22:50
Change how WordPress sends emails
<?php
/**
* Plugin Name: Custom WordPress Email
* Plugin URI: https://gist.github.com/4137632
* Description: Change how WordPress sends emails
* Author: Shea Bunge
* Author URI: http://bungeshea.com
* Version: 1.0
*/