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 | |
add_filter( 'charitable_donation_form_fields', 'givinghand_charitable_donation_form_fields', 10, 2 ); | |
function givinghand_charitable_donation_form_fields( $fields, $object ) { | |
$fields['donation_fields']['legend'] = '<h4>'. esc_html__( 'How Much Would you like to Donate?', 'givinghand' ) .'</h4>'; | |
$fields['user_fields']['legend'] = '<h4>'. esc_html__( 'Billing Information', 'givinghand' ) .'</h4>'; | |
return $fields; | |
} |
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 template used to display the default form. | |
* | |
* @author Studio 164a | |
* @package Charitable/Templates/Donation Form | |
* @since 1.0.0 | |
* @version 1.3.0 | |
*/ |
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 ed_add_missing_comment( $donation_id ) { | |
$comment = get_post_meta( $donation_id, 'donor_comment', true ); | |
if ( empty( $comment ) ) { | |
return; | |
} | |
$donation = charitable_get_donation($donation_id ); | |
$donor = $donation->get_donor(); |
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
window.Charitable.Hooks.addFilter( 'stripeCardElementOptions', 'myCustom', () => { | |
return { | |
style: { | |
base: { | |
iconColor: '#c4f0ff', | |
color: '#444', | |
fontWeight: '500', | |
fontFamily: 'Roboto, Open Sans, Segoe UI, sans-serif', | |
fontSize: '16px', | |
fontSmoothing: 'antialiased', |
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 adds a new shortcode you can use to display different | |
* text based on the current locale. | |
*/ | |
add_shortcode( 'if_locale', function( $atts, $content ) { | |
$defaults = array( | |
'language' => '', | |
); |
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 will override the default donation form theme template in Charity Home, | |
* which does not fully support all Charitable extensions. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly | |
$form = $view_args['form']; | |
$user_fields = $form->get_user_fields(); |
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 template for displaying all single posts | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | |
* | |
* @package loveus | |
*/ | |
get_header(); | |
$campaign = charitable_get_current_campaign(); |
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
add_action( | |
'admin_init', | |
function() { | |
return charitable_create_campaign( | |
array( | |
'title' => 'My new campaign', | |
'content' => 'Extended content about this campaign', | |
'creator' => get_current_user_id(), | |
'status' => 'draft', | |
'parent' => 541, |
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
add_filter( | |
'charitable_giftaid_export_row', | |
function( $row ) { | |
return array( | |
'donation_id' => $row['donation_id'] ?? '', | |
'title' => $row['title'] ?? '', | |
'first_name' => $row['first_name'] ?? '', | |
'last_name' => $row['last_name'] ?? '', | |
'house_number' => $row['house_number'] ?? '', | |
'postcode' => $row['postcode'] ?? '', |
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
CHARITABLE = window.CHARITABLE || {}; | |
( function( $ ) { | |
var $body = $( 'body' ); | |
/** | |
* Do something when a donation form loads. | |
* | |
* @since 1.0.0 |
NewerOlder