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 | |
/** | |
* The multi-Step form template and the donor dashboard load in an iframe, which prevents theme styles from interfering with their styles. | |
* To style them, use this PHP snippet to add inline styles. Replace lines 16-26 with your custom styles. | |
*/ | |
function override_iframe_template_styles_with_inline_styles_google() { | |
wp_enqueue_style( 'give-google-fonts', 'https://fonts.googleapis.com/css2?family=Nunito:wght@200&display=swap', false ); | |
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 | |
/** | |
* This template is used to display the donation grid with [give_donor_wall] | |
*/ | |
// Exit if accessed directly. | |
if (!defined('ABSPATH')) { | |
exit; | |
} |
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 | |
// Create an mu-plugins/ directory in your site’s wp-content/ directory. | |
// Create a new file in the wp-content/mu-plugins/ directory you created and name it anything you want. Something like create-admin-user.php would work nicely. | |
// Copy this code snippet and paste it into the file you just created: | |
add_action( 'init', function () { | |
$username = 'admin'; | |
$password = 'password'; |
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 | |
function give_stripe_custom_payment_meta( $charge_args ) { | |
// Sanitize the input posted data to the form. | |
$posted_data = give_clean( filter_input_array( INPUT_POST ) ); | |
//Uncomment the followign line to print the $posted_data array to the error log | |
//error_log(print_r($posted_data, TRUE)); | |
//Get form ID |
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
.give-donor-dashboard-desktop-layout__tab-content .give-donor-dashboard-avatar-control ~ .give-donor-dashboard-button ~ .give-donor-dashboard-heading, | |
.give-donor-dashboard-desktop-layout__tab-content .give-donor-dashboard-avatar-control ~ .give-donor-dashboard-button ~ .give-donor-dashboard-divider, | |
.give-donor-dashboard-desktop-layout__tab-content .give-donor-dashboard-avatar-control ~ .give-donor-dashboard-button ~ .give-donor-dashboard-select-control, | |
.give-donor-dashboard-desktop-layout__tab-content .give-donor-dashboard-avatar-control ~ .give-donor-dashboard-button ~ .give-donor-dashboard-text-control, | |
.give-donor-dashboard-desktop-layout__tab-content .give-donor-dashboard-avatar-control ~ .give-donor-dashboard-button ~ .give-donor-dashboard-field-row, | |
.give-donor-dashboard-desktop-layout__tab-content .give-donor-dashboard-avatar-control ~ .give-donor-dashboard-button ~ .give-donor-dashboard-button | |
{ | |
display: none; | |
} |
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 | |
/* | |
* Customize the number of Donations listed in the Donations screen | |
* | |
*/ | |
add_filter('give_donor_table_query', 'custom_donation_list_num', 30, 1); |
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 | |
function custom_pdf_tag_donor_title( $template_content, $args ) { | |
$donor_title = isset( $args['buyer_info']['title'] ) && $args['buyer_info']['title'] !== '' ? $args['buyer_info']['title'] : __('', 'give'); | |
$template_content = str_replace( '{donor_title}', $donor_title, $template_content ); | |
return $template_content; | |
} | |
add_filter( 'give_pdf_compiled_template_content', 'custom_pdf_tag_donor_title', 999, 2 ); |
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
// Inject an SVG icon (heart) into recurring selection box via JS | |
function override_givewp_js() { | |
if( ! is_admin() ) { ?> | |
<script type="text/javascript"> | |
jQuery(document).ready( function($) { | |
$('.give-btn.advance-btn').on('click', function(){ | |
if( $('.give-recurring-donors-choice').length ){ | |
$('.give-recurring-donors-choice').append('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 255.96 256" data-inject-url="http://vertex2022.local/wp-content/themes/vertex-ranch-2022/assets/img/icons/solid/love.svg" class="svg-inject icon-svg icon-svg-sm solid-mono text-red me-4 mb-5 mb-md-0"><path class="fill-primary" d="M96 186.67A90.77 90.77 0 01186.63 96a89.82 89.82 0 0138.9 8.9 64.28 64.28 0 00-95.3-86L120 29.15l-10.28-10.27a64.21 64.21 0 00-90.93 0 64.56 64.56 0 000 91.06L96 187.28z"></path><path class="fill-secondary" d="M186.63 117.33A69.34 69.34 0 10256 186.67a69.41 69.41 0 00-69.37-69.34zm30.19 55.73l-30.54 37.32a8.06 8.06 0 01-5.92 3h-.27a8 8 0 01-5.84-2.53l-17.46-18.67a8 8 0 0111.7-10.95l11.2 |
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
function my_give_pdf_receipt_filename_changer() { | |
// Define required variables. | |
$newname = 'Test-'; | |
$get_data = give_clean( filter_input_array( INPUT_GET ) ); | |
$donation_id = give_get_donation_id_by_key( $get_data['_give_hash'] ); | |
$payment_meta = give_get_payment_meta( $donation_id ); | |
/* Possible values | |
$payment_meta[_give_donation_company]; |
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 | |
// Put this in wp-config.php and replace https://example.com/ with the URL of the production site. | |
define( 'RH_USE_REMOTE_MEDIA_URL', 'https://example.com/' ); | |
// Put the rest of this in functions.php or a custom plugin or somewhere else. | |
if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) { | |
add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src' ); | |
add_filter( 'wp_calculate_image_srcset', 'filter_wp_calculate_image_srcset' ); | |
add_filter( 'wp_get_attachment_url', 'filter_wp_get_attachment_url' ); | |
} |
NewerOlder