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 lets you override the Donors widget output in Charitable, by adding the donor | |
* name and organisation to the widget. | |
* | |
* Save it to yourtheme/charitable/widgets/donors.php | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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 custom styles to the <head> section. | |
* | |
* This is used on the wp_head action. | |
* | |
* @return void | |
* @since 1.2.0 | |
*/ | |
function charitable_template_custom_styles() { | |
if ( ! apply_filters( 'charitable_add_custom_styles', 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 | |
/** | |
* Process shortcode submission. | |
* | |
* @since Astoundify Crowdfunding 0.8 | |
* | |
* @return void | |
*/ | |
function atcf_shortcode_profile_info_process() { | |
global $edd_options, $post; |
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
/* | |
The baseline. This will be applied to any browser that does not | |
support calc, and any browser that is smaller than 800px wide | |
*/ | |
.comments-list, | |
.comment { | |
width: 100%; | |
} | |
.comments-section .children { |
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 | |
/** | |
* After more than a year in development, we finally | |
* launched Charitable on August 19. | |
* | |
* @see https://www.wpcharitable.com/charitable-now-available-on-wordpress-org/ | |
*/ | |
did_action( 'charitable_launch' ); | |
/** |
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 pp_add_user_profile_fields( $user ) { | |
$skip = array( 'first_name', 'last_name', 'user_email', 'description' ); | |
$switch_keys = array( | |
'address' => 'donor_address', | |
'address_2' => 'donor_address_2', | |
'city' => 'donor_city', | |
'state' => 'donor_state', |
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
/** | |
* This function will automatically set the status of a newly | |
* submitted campaign to 'publish'. | |
*/ | |
function franklin_auto_approve_campaign( $campaign, $submitted, $status ) { | |
if ( 'pending' == $status ) { | |
wp_update_post( array( | |
'ID' => $campaign, | |
'post_status' => 'publish' |
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
.campaign-grid-4 .campaign { | |
width: 23.5%; | |
} | |
.campaign-grid-4 .campaign:nth-child(4n+4) { | |
margin-right: 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
$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' ); |