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 a campaign object for the campaign with ID 123. | |
$campaign = charitable_get_campaign( 123 ); | |
// Get the campaign end date. | |
$end_date = $campaign->get_end_date(); | |
// Get the campaign end date, formatted like this: "9 January, 2017" | |
// You can use any valid PHP date format. See http://php.net/manual/en/function.date.php |
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 | |
// Default usage. | |
// | |
// This will get the most recent X campaigns, where X is the | |
// same as the number of posts you have set to show on a blog | |
// page (defaults to 10). | |
$campaigns = Charitable_Campaigns::query(); | |
// Only get current, active campaigns. |
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 version number saved in theme_mod "version" doesn't match current theme version. | |
*/ | |
function prefix_update_check() { | |
$ver = get_theme_mod( 'version', false ); |