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 your theme or child theme's functions.php file. | |
*/ | |
function en_register_campaign_sidebar() { | |
$args = array( | |
'id' => 'campaign-sidebar', | |
'name' => __( 'Campaign Sidebar', 'your-textdomain' ), |
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 get_header() ?> | |
<?php | |
global $porto_settings, $porto_layout; | |
wp_reset_postdata(); | |
?> | |
<div id="content" role="main"> |
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 - My Custom Tweaks | |
* Plugin URI: | |
* Description: A simple plugin to allow you to add your own tweaks. | |
* 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
<?php | |
/** | |
* Theme Update Script | |
* | |
* Runs if the logo has not been set yet. | |
*/ | |
function prefix_update_check() { | |
// Return if update has already been run | |
if ( -1 == get_theme_mod( 'custom_logo', -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
/** | |
* Add the `hentry` post class to campaigns. | |
* | |
* Some themes remove this class, which breaks the [campaigns] shortcode display. | |
* | |
* @param string[] $classes | |
* @return string[] | |
*/ | |
function en_set_campaign_hentry_post_class( $classes ) { | |
if ( Charitable::CAMPAIGN_POST_TYPE == get_post_type() && ! in_array( 'hentry', $classes ) ) { |
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
/* If you just do not want uppercase text for headers & buttons, etc, you can use this */ | |
h1, h2, h3, h4, h5, h6, .menu-site li, button, .button, .tribe-events-button, input[type=submit], input[type=reset], .campaign-summary li span, .countdown, .site-title, .site-tagline, .post-title, .entry-header .entry-title, .page-title, legend, .charitable-form-header, .account-links, .barometer span span, .bypostauthor .post-author, .meta, cite, th, .edd_cart_amount, #rockbottom, .campaign-status .campaign-raised span, .campaign-status .campaign-pledged span, .campaign-status .campaign-time-left span, .widget_crowdfunding_stats_widget li span, .campaign-status-tag, .tabs .tab-title, .charitable-campaign-creator-toolbar a, .donation-amounts .amount, .donation-amounts .custom-donation-amount, .widget.widget_charitable_donation_stats_widget .figure, .campaign-finished, .download-price, .sticky-tag, .campaign-title, .author .author-facts h2, .author .author-bio h3, .button-alt, .button-secondary, .button.button-alt, .butto |
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 charitable_template_campaign_summary( $campaign ) { | |
if ( has_term( 'my-special-category', 'campaign_category', $campaign->ID ) ) { | |
return; | |
} | |
charitable_template( 'campaign/summary.php', array( 'campaign' => $campaign ) ); | |
} |