This file contains hidden or 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 | |
| function give_export_gift_aid() { | |
| ?> | |
| <li> | |
| <label for="give-export-payment-gift_aid"> | |
| <input type="checkbox" checked name="give_give_donations_export_option[gift_aid]" id="give-export-gift_aid"><?php _e( 'Gift Aid', 'give' ); ?> | |
| </label> | |
| </li> | |
| <?php |
This file contains hidden or 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 | |
| add_filter('give_get_country_locale', 'give_custom_requirements'); | |
| function give_custom_requirements() { | |
| $countries = array( | |
| 'US' => [ | |
| 'state' => [ | |
| 'required' => false, | |
| ], | |
| 'address1' => [ |
This file contains hidden or 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 | |
| add_filter( 'give_gift_aid_export_get_data', static function($data) { | |
| foreach($data as $key => $datakey){ | |
| $first_name = give_get_payment_meta($datakey['gift_aid_donation_id'], '_give_donor_billing_first_name', true); | |
| $last_name = give_get_payment_meta($datakey['gift_aid_donation_id'], '_give_donor_billing_last_name', true); | |
| $data[$key]['gift_aid_first_name'] = $first_name; | |
| $data[$key]['gift_aid_last_name'] = $last_name; | |
| } | |
| return $data; |
This file contains hidden or 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 | |
| // Create a cookie to store the parent window referral url | |
| add_action( "givewp_donation_form_enqueue_scripts", function () { | |
| ?> | |
| <script> | |
| document.addEventListener("DOMContentLoaded", function () { | |
| createCookie("givewp_referrer", window.parent.frames.top.document.referrer, "1"); | |
| // Function to create the cookie |
This file contains hidden or 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
| function add_give_honoree_name_tag() { | |
| give_add_email_tag( | |
| array( | |
| 'tag' => 'honoree_fullname', // The tag name. | |
| 'desc' => __( 'The full name of the honoree.', 'give-tributes' ), | |
| 'func' => 'custom_tribute_tag_honoree_fullname', // Callback to function below. | |
| 'context' => 'donation', // This tag can be for both admin and donor notifications. | |
| 'is_admin' => false, // default is false. This is here to simply display it as an option. | |
| ) | |
| ); |
This file contains hidden or 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 | |
| //don't include this | |
| /** ==================================================================================== | |
| * Break more link outside the paragraph in the loop on all archives (home, archives, search, etc) | |
| ==================================================================================== **/ | |
| function yourprefix_excerpt_more_link() { |
This file contains hidden or 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
| /* | |
| * Send notifications only to certain devices | |
| */ | |
| // Change this hook | |
| add_action( 'save_post', 'push_to_devices' ); | |
| function push_to_devices() { | |
| // this should be an array of user IDs that you want to send the pushes too. AppPresser saves device IDs if the app user is a logged in member of your WordPress site, for example in BuddyPress. This will not work unless the user has logged in through your app. |
This file contains hidden or 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 | |
| /** | |
| * Send admin notification to a different email address | |
| */ | |
| function affwp_custom_registration_admin_email( $email ) { | |
| // add the email here | |
| $email = '[email protected]'; | |
| return $email; |