Skip to content

Instantly share code, notes, and snippets.

View curtismchale's full-sized avatar

Curtis McHale curtismchale

View GitHub Profile
@trepmal
trepmal / comment-generate-cli.php
Created July 3, 2014 18:15
Can either pop this into a plugin and activate it to make the command available. Or install as a package via these instructions: https://github.com/wp-cli/wp-cli/wiki/Community-Packages
<?php
if ( !defined( 'WP_CLI' ) ) return;
/**
* Comment Generate
*/
class Comment_Generate extends WP_CLI_Command {
/**
@pippinsplugins
pippinsplugins / gist:d498bb26d0723ae99f0a
Created July 11, 2014 13:22
Disable the Stripe payment gateway when a specific Download ID is in the cart
<?php
function pw_edd_maybe_disable_stripe( $gateways ) {
$disable = false;
$cart_items = edd_get_cart_contents();
if( $cart_items ) {
foreach( $cart_items as $item ) {
@kstover
kstover / export-filtered-subs.php
Last active August 29, 2015 14:18
Exporting filtered submissions using the Ninja Forms Submissions API
<?php
// Build an array that we can use for filtering our submitted data.
$args = array(
// fields is a key in our associative array that means we're looking for field values.
'fields' => array(
// 1 represents our field id and 'Kevin' represents the value we're looking to match.
1 => 'Kevin',
// If you want to filter by multiple fields, you'd add them here.
// 2 => 'checked'
),