Skip to content

Instantly share code, notes, and snippets.

View DevinWalker's full-sized avatar
🌱
Coding for good

Devin Walker DevinWalker

🌱
Coding for good
View GitHub Profile
@DevinWalker
DevinWalker / give-fee-recovery-import-enhancement.php
Created May 21, 2024 21:23
GiveWP Import Fee Recovery Fields
function my_custom_give_import_donation_fields( $options ) {
// Add 'Donor Age' field
$options['_give_fee_amount'] = [
__( 'Recovered Fee', 'give' ),
__( 'Fee Recovery', 'give' ),
__( 'Fee Recovered', 'give' ),
__( 'Fee Covered', 'give' ),
];
@DevinWalker
DevinWalker / iterm2-solarized.md
Created January 7, 2022 22:57 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@DevinWalker
DevinWalker / gravity-forms-strip-email-from-name-quotes.php
Last active February 1, 2022 14:14
For some odd reason Gravity Forms includes quotes in the "From" sender name. This is inconsistent with other mail senders so this removes the quotes in the "From Name" email headers.
/**
* Replace Quotes in Gravity Forms Email Headers
*
* For some odd reason Gravity Forms includes quotes in the "From" sender name. This is inconsistent with other mail senders so this removes the quotes.
*
* @param $email
* @param $message_format
* @param $notification
*
* @return mixed
@DevinWalker
DevinWalker / formidable-givewp-pass-values-proof-of-concept.php
Created November 22, 2019 19:34
If you'd like to pre-populate a Formidable form on the donation thank you receipt page this is a simple way to pass values to $_GET which it expects.
<?php
/**
* Passing receipt values to $_GET for formidable forms.
*
* @see: https://formidableforms.com/knowledgebase/using-dynamic-default-values-in-fields/#kb-pass-a-value-to-a-form
*
* @param $donation
* @param $give_receipt_args
*/
@DevinWalker
DevinWalker / shortcode-donor-wall.php
Created November 14, 2019 17:36
GiveWP donor wall template customized to display tribute / dedicated donations
<?php
/**
* This template is used to display the donation grid with [give_donor_wall]
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
@DevinWalker
DevinWalker / resize_local_machine.sh
Created July 23, 2019 23:00 — forked from claygriffiths/resize_local_machine.sh
Resize Local by Flywheel VirtualBox image
# Steps we will take:
# 1. Change Local (Docker Machine) image type (this will take a bit)
# 2. Resize image
# 3. Resize partion
#
# Also see: https://docs.docker.com/articles/b2d_volume_resize/
# IMPORTANT: Make sure Local is not running!
VM_NAME="local-by-flywheel"
NEW_DISK_SIZE=50000
@DevinWalker
DevinWalker / wp-config.php
Created December 11, 2017 17:11 — forked from emgk/wp-config.php
WP Debug Configurations
define('WP_DEBUG', true);
define('SCRIPT_DEBUG',true);
if ( WP_DEBUG ) {
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'log_errors', 'On' );
@ini_set( 'display_errors', 'Off' );
@ini_set( 'error_reporting', E_ALL );
@ini_set( 'error_log', 'php_error.log' );
@DevinWalker
DevinWalker / setup-phpunit.sh
Created May 26, 2017 20:46 — forked from keesiemeijer/setup-phpunit.sh
Setup PHPUnit for use in the Local by Flywheel app
#!/usr/bin/env bash
# ===============================================================================
# Script to install PHPUnit in the Local by Flywheel Mac app
# These packages are installed
#
# PHPUnit, git, subversion, composer, curl and wget
#
# WordPress and the WP_UnitTestCase are installed in the /tmp directory
# The $WP_CORE_DIR and $WP_TESTS_DIR variables are added to the .bashrc file
/* Basic form style cleanup */
ul#give-donation-level-radio-list {
list-style: none;
padding: 0;
}
ul#give-donation-level-radio-list input {
margin: 0 5px 0 3px;
}
@DevinWalker
DevinWalker / give-literal-gateway-labels.php
Created January 14, 2016 02:18
Call the Gateway by it's name; primarily used for testing purposes
/**
* Call Give Payment Gateways by Name
*
* @param $gateways
*
* @return mixed
*/
function gr_override_gateway_labels( $gateways ) {
$gateways['authorize']['checkout_label'] = 'Authorize';
$gateways['stripe']['checkout_label'] = 'Stripe';