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 | |
/** | |
* ChurchThemes.com Agency Mode | |
* | |
* See https://churchthemes.com/go/agency-mode/ for information. | |
* PHP 5.6+ is required. You can use define() with PHP 7+. | |
*/ | |
const CT_AGENCY_MODE = array( | |
'name' => 'Acme Agency', // Agency or freelancer name to show user. |
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 ctfw_google_maps_api_key() { | |
$key = ''; | |
// Make sure the Church Content plugin's function is available | |
if ( function_exists( 'ctc_setting' ) ) { | |
$key = ctc_setting( 'google_maps_api_key' ); | |
} |
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 | |
/** | |
* Load framework | |
*/ | |
require_once get_template_directory() . '/framework/framework.php'; // do this before anything |
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 | |
'field_overrides' => array( | |
'_ctc_person_urls' => array( | |
'name' => __( 'New Title', 'yourtheme' ), | |
'desc' => __( 'Enter one URL per line.', 'yourtheme' ) | |
), | |
'_ctc_person_email' => array( | |
'desc' => sprintf( __( 'The WordPress <a href="%s" target="_blank">antispambot</a> function is used to help deter automated email harvesting.', 'yourtheme' ), 'http://codex.wordpress.org/Function_Reference/antispambot' ) | |
) |
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 | |
// Sermons | |
add_theme_support( 'ctc-sermons', array( | |
'taxonomies' => array( | |
'ctc_sermon_topic', | |
'ctc_sermon_book', | |
'ctc_sermon_series', | |
'ctc_sermon_speaker', | |
'ctc_sermon_tag', |
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 yourtheme_add_ctc_support() { | |
/** | |
* Plugin Support | |
* | |
* Tell plugin theme supports it. This leaves all features disabled so they can | |
* be enabled explicitly below. When support not added, all features are revealed | |
* so user can access content (in case switched to an unsupported theme). |
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
/** | |
* Responsive Embeds | |
*/ | |
jQuery( document ).ready( function( $ ) { | |
// Remove <object> element from Blip.tv ( use iframe only ) - creates a gap w/FitVid | |
$( "embed[src*='blip.tv']" ).remove(); | |
// Use FitVid for responsive videos and other embeds |
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 | |
/** | |
* Change sermon slug in URL | |
* | |
* Example of how to change sermon slug in Church Content plugin. | |
* This is ideally placed in your own functionality plugin so that it works after switching themes. | |
* | |
* REQUIRED: Go to Settings > Permalinks and save after applying this, or it will not take effect | |
* |
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 | |
/** | |
* Filter the_excerpt to show content in a more ideal way. | |
* | |
* The way content is shown depends on the priority of a situation: | |
* | |
* 1. the_content with "Read More" link if the "More" tag is used | |
* 2. Manual excerpt with "Read More" link if excerpt is manually entered | |
* 3. the_content in its entirety if less than 200 words (nicer than automatic excerpt) |