Skip to content

Instantly share code, notes, and snippets.

Mannie Schumpert mannieschumpert

Block or report user

Report or block mannieschumpert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mannieschumpert
mannieschumpert / gist:8888351
Last active Aug 29, 2015
Some filter examples for preventing editing of certain users.
View gist:8888351
<?php
/**
* Prevent Editing of a specified user
*
* This example shows how you can protect the original admin from being edited or deleted by anyone else
*/
add_filter('map_meta_cap', 'prevent_user_edit', 10, 4 );
function prevent_user_edit( $required_caps, $cap, $user_id, $args ){
$protected_user = 1; // ID of user not editable
@mannieschumpert
mannieschumpert / SassMeister-input.scss
Last active Aug 29, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// Susy (v2.0.0.rc.1)
// ----
@import "susyone";
li.gfield {
@mannieschumpert
mannieschumpert / SassMeister-input.scss
Created Feb 23, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// Susy (v2.0.0.rc.1)
// ----
@import "susyone";
li.gfield {
@mannieschumpert
mannieschumpert / gist:9277517
Created Feb 28, 2014
If running the new Gravity Forms add-on for Easy Digital Downloads, and don't have a gateway hooked up yet, you can drop this in to return all submissions successful while testing.
View gist:9277517
<?php
add_filter('edd_gf_default_status','return_all_complete');
function return_all_complete(){
return 'publish';
}
@mannieschumpert
mannieschumpert / gist:9492274
Last active Aug 29, 2015
QuickTip: Make an SVG Library for Your Custom Post Type Icons
View gist:9492274
<?php
// Create your SVG library function
// Put this at the bottom of your functions.php file,
// or out of the way wherever you like
function menu_icons($icon){
// Store your SVGs in an associative array
$svgs = array(
'microphone' => 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjY0cHgiIGhlaWdodD0iMTAwcHgiIHZpZXdCb3g9IjAgLTIwIDY0IDEyMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjQgMTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8Zz4NCgkJPHBhdGggZD0iTTYyLDM2LjIxNWgtM2MtMS4xLDAtMiwwLjktMiwyVjUyYzAsNi42ODYtNS4yNjYsMTgtMjUs
@mannieschumpert
mannieschumpert / SassMeister-input.scss
Created May 25, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// Susy (v2.1.1)
// ----
@import "susyone";
div {color: rgba(#fff,0.9);}
li.gfield {
@mannieschumpert
mannieschumpert / gist:d056a1b81d0a15c4f76f
Last active Aug 29, 2015
A reusable solution for adding element classes in the Genesis framework.
View gist:d056a1b81d0a15c4f76f
<?php
/**
* General function for adding element classes in Genesis
*/
function add_gen_classes( $attr, $classes, $layout = NULL ){
// If there's a layout parameter, and current layout does not match, return classes unchanged
// This part is pseudo code - not sure if this is the function for testing current layout
if ( $layout && ! genesis_site_layout( $layout ) )
@mannieschumpert
mannieschumpert / 0_reuse_code.js
Created Jul 11, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mannieschumpert
mannieschumpert / SassMeister-input.scss
Created Jul 24, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// Susy (v2.1.2)
// ----
@import "susy";
@mixin mq-layout(
$mq,
View gist:8377fb15429715a2fd09
<?php
function unregister_all_widgets() {
unregister_widget('WP_Widget_Pages');
unregister_widget('WP_Widget_Calendar');
unregister_widget('WP_Widget_Archives');
unregister_widget('WP_Widget_Links');
unregister_widget('WP_Widget_Meta');
unregister_widget('WP_Widget_Search');
unregister_widget('WP_Widget_Text');
unregister_widget('WP_Widget_Categories');
You can’t perform that action at this time.