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 | |
/** | |
* Set the default colour used by Charitable. | |
* | |
* @return string | |
*/ | |
function checkout_charitable_default_colour() { | |
return '#37BF91'; | |
} |
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 is designed to be a drop-in replacement for the donation button in the campaign loop. | |
* | |
* Instead of linking to the donation page, it links to the campaign page. The text is changed to Read More. | |
* | |
* Save this file at yourtheme/charitable/campaign-loop/donation-link.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
<?php | |
/** | |
* Campaign stats. | |
* | |
* This is a variation of the default template provided in Reach. Instead of showing the percentage funded, it shows | |
* the actual funded amount. It also shows the goal amount. | |
* | |
* This should be saved to your-child-theme/charitable/campaign-loop/stats.php | |
* | |
* @package Reach |
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
<?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; | |
} |