-
-
Save langlers/3b01a14c4a052ee13820826b224bcff0 to your computer and use it in GitHub Desktop.
Give givewp.com Donation Plugin - list of all actions and filters for testing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Debug Give Wp | |
Plugin URI: https://gist.github.com/squarecandy/8ed8265bde0c39e42ab8a19c062bf534 | |
Description: Help discover where all of Give's action can plop in some content, and what all the filters do | |
Version: 1.0 | |
Author: Square Candy | |
Author URI: http://squarecandy.net | |
License: GPLv3 | |
License URI: http://www.gnu.org/licenses/gpl.txt | |
Text Domain: debug-give-wp | |
*/ | |
/* Uncomment one or a few at a time to see what each one does! */ | |
// add_action( 'give_before_main_content', function() { echo '<p>give_before_main_content goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_before_single_form', function() { echo '<p>give_before_single_form goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_single_form_summary', function() { echo '<p>give_single_form_summary goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_pre_form_output', function() { echo '<p>give_pre_form_output goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_pre_form', function() { echo '<p>give_pre_form goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_checkout_form_top', function() { echo '<p>give_checkout_form_top goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_before_donation_levels', function() { echo '<p>give_before_donation_levels goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_after_donation_amount', function() { echo '<p>give_after_donation_amount goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_after_donation_levels', function() { echo '<p>give_after_donation_levels goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_payment_mode_selec', function() { echo '<p>give_payment_mode_selec goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_payment_mode_top', function() { echo '<p>give_payment_mode_top goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_payment_mode_before_gateways', function() { echo '<p>give_payment_mode_before_gateways goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_payment_mode_after_gateways', function() { echo '<p>give_payment_mode_after_gateways goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_payment_mode_after_gateways_wrap', function() { echo '<p>give_payment_mode_after_gateways_wrap goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_payment_mode_bottom', function() { echo '<p>give_payment_mode_bottom goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_donation_form', function() { echo '<p>give_donation_form goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_donation_form_top', function() { echo '<p>give_donation_form_top goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_donation_form_before_register_login', function() { echo '<p>give_donation_form_before_register_login goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_donation_form_register_login_fields', function() { echo '<p>give_donation_form_register_login_fields goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_donation_form_before_cc_form', function() { echo '<p>give_donation_form_before_cc_form goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_cc_form', function() { echo '<p>give_cc_form goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_before_cc_field', function() { echo '<p>give_before_cc_field goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_before_cc_expiration', function() { echo '<p>give_before_cc_expiration goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_after_cc_expiration', function() { echo '<p>give_after_cc_expiration goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_after_cc_fields', function() { echo '<p>give_after_cc_fields goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_donation_form_after_cc_form', function() { echo '<p>give_donation_form_after_cc_form goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_donation_form_bottom', function() { echo '<p>give_donation_form_bottom goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_post_form_output', function() { echo '<p>give_post_form_output goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_after_single_form_summary', function() { echo '<p>give_after_single_form_summary goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_after_single_form', function() { echo '<p>give_after_single_form goes here!</p>'; }, 10, 1 ); | |
// add_action( 'give_after_main_content', function() { echo '<p>give_after_main_content goes here!</p>'; }, 10, 1 ); | |
/* ACTION FAVORITES: */ | |
// give_donation_form_before_cc_form | |
// this goes after the "Personal Info" area and before the Payment Info | |
// good for stuff like "anonymous donation" checkbox or Email List subscription checkbox | |
// give_donation_form_after_cc_form | |
// After the Payment Form, before the final amount confirmaion and submit button | |
// Nice for a "notes" field or other final fields before submitting the transaction | |
/* FILTERS !!!! */ | |
// give_donate_form: the whole freakin' form | |
// You could do lots of fancy stuff with this. Be careful! | |
// function give_donate_form_callback ($e) { print_r($e); return $e; } add_filter( 'give_donate_form', 'give_donate_form_callback'); | |
// Not sure, but I assume this alters the text shown if your Goal Based donation is past the expiration time. | |
// function give_goal_closed_output_callback ($e) { print_r($e); return $e; } add_filter( 'give_goal_closed_output', 'give_goal_closed_output_callback'); | |
// give_form_title: the title of the form | |
// function give_form_title_callback ($e) { print_r($e); return $e; } add_filter( 'give_form_title', 'give_form_title_callback'); | |
// I find it annoying that this still shows up when you use a shortcode | |
// Frequently your form called "Donate" has a big title over it on your page that's already called "Donate" | |
// Use this to kill the form title entirely: | |
function give_form_title_callback ($e) { | |
return ''; | |
} | |
add_filter( 'give_form_title', 'give_form_title_callback'); | |
// Not sure what these do: ??? | |
// function give_credit_card_fieldset_heading_callback ($e) { print_r($e); return $e; } add_filter( 'give_credit_card_fieldset_heading', 'give_credit_card_fieldset_heading_callback'); | |
// function give_forms_single_summary_classes_callback ($e) { print_r($e); return $e; } add_filter( 'give_forms_single_summary_classes', 'give_forms_single_summary_classes_callback'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment