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
$fields[ 'national_id_number' ] = array( | |
'label' => __( 'National ID Number', 'your-namespace' ), | |
'type' => 'select', | |
'options' => array( | |
'val1' => __( 'Label 1', 'your-namespace' ), | |
'val2' => __( 'Label 2', 'your-namespace' ) | |
), | |
'priority' => 24, | |
'value' => $form->get_user_value( 'donor_national_id_number' ), | |
'required' => true, |
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_change_length_label( $fields ) { | |
$fields[ 'length' ][ 'label' ] = __( 'Length (# of days)', 'your-namespace' ); | |
return $fields; | |
} | |
add_filter( 'charitable_campaign_submission_campaign_fields', 'ed_change_length_label' ); |
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 ed_charitable_disable_comments( $open, $post_id ) { | |
/* If open is already false, just hit return. */ | |
if ( ! $open ) { | |
return $open; | |
} | |
if ( charitable_is_page( 'campaign_donation_page' ) | |
|| charitable_is_page( 'campaign_widget_page' ) | |
|| charitable_is_page( 'donation_receipt_page' ) | |
|| charitable_is_page( 'donation_processing_page' ) ) { |
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 | |
/** | |
* Collect the donor's Dedication wishes in the donation form. | |
* | |
* @param array[] $fields | |
* @param Charitable_Donation_Form $form | |
* @return array[] | |
*/ | |
function ed_collect_dedication( $fields, Charitable_Donation_Form $form ) { |
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 ed_set_correct_email_headers( $headers, $email ) { | |
$from_address = charitable_get_option( 'email_from_email', get_option('admin_email') ); | |
$headers = "From: {$email->get_from_name()} <{$from_address}>\r\n"; | |
$headers .= "Reply-To: {$from_address}\r\n"; | |
$headers .= "Content-Type: {$email->get_content_type()}; charset=utf-8\r\n"; | |
return $headers; | |
} |
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: Charitable - Send New Campaign Notificaiton | |
* Plugin URI: https://gist.github.com/ericnicolaas/de776cdd17e3ee333fe5/edit | |
* Description: Correctly send the New Campaign Notification email after a campaign is submitted. | |
* Version: 0.1 | |
* Author: WP Charitable | |
* Author URI: https://wpcharitable.com/ | |
*/ |
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
class Charitable_Ambassadors_Email_New_Campaign extends Charitable_Email { | |
/** | |
* @var string | |
*/ | |
CONST ID = 'new_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
////////////////////// | |
// Find this: | |
class Charitable_Ambassadors_Email_New_Campaign extends Charitable_Email { | |
/** | |
* @var string | |
*/ | |
CONST ID = 'new_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
@media only screen and (max-width: 800px) { | |
.campaign-loop.campaign-grid .campaign.hentry { | |
width: 100% !important; | |
} | |
} |