Skip to content

Instantly share code, notes, and snippets.

View chriscct7's full-sized avatar

Chris Christoff chriscct7

View GitHub Profile
@tripflex
tripflex / functions.php
Last active July 12, 2024 13:20
WordPress Remove Filter (remove_filter converted to remove_class_filter) to remove Filter/Action without Class Object access. Works with WordPress 1.2+ (4.7+ support added 9-19-2016)
<?php
/**
* Make sure the function does not exist before defining it
*/
if( ! function_exists( 'remove_class_filter' ) ){
/**
* Remove Class Filter Without Access to Class Object
*
* In order to use the core WordPress remove_filter() on a filter added with the callback
@johnbillion
johnbillion / wp_mail.md
Last active June 3, 2024 13:31
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@thomasgriffin
thomasgriffin / gist:8012662
Last active December 31, 2015 16:19
REMOVE ALL THE METABOXES FROM ALL THE THINGS. WARNING: THIS THING IS VERY AGGRESSIVE.
<?php
add_action( 'add_meta_boxes', 'tgm_remove_all_the_metaboxes', 100 );
/**
* Removes all metaboxes except the ones I WANT ON MY POST TYPE. RAGE.
*
* This assumes a specific post type. In my case, it is 'envira'.
* This function is very aggressive and removes every single metabox minus
* the needed submitdiv metabox (which allows you to publish something) and
* the metaboxes that I register with my plugin.
*
@bearded-avenger
bearded-avenger / easy-digital-downloads-changelog-shortcode
Last active September 5, 2024 01:42
Easy Digital Downloads - Changelog Shortcode (pass the EDD download ID and output a button that opens the changelog in a lightbox) - Completely un-styled and ready to abuse
/*
Use: [changelog id=""]
Atts: "id" is the id of the download in EDD
*/
add_shortcode('changelog','edd_changelog_sc'));
function edd_changelog_sc($atts,$content = null) {
$defaults = array(
@DrewAPicture
DrewAPicture / 36_props.sh
Last active December 19, 2015 13:09
WordPress props between two revisions. Requires ack or grep (just replace ack calls with grep).
svn log http://develop.svn.wordpress.org/trunk -r 26861:HEAD | ack -i "props" | ack -ic "DrewAPicture"
#!/bin/sh
# A script that leverages Trac XML-RPC (I know, I know) to upload patches.
#
# This script is written specifically for the Mac, in that it reads from
# your keychain to derive your SVN password. You can change the SVN_PASS
# line below if you wanted to pull from ~/.svn/ or what not.
#
# Basic usage: `trac-attach.sh 12345` uploads a patch to ticket #12345,
# using the name 12345.diff. If there exists a 12345.diff, the patch is