OwlCyberSecurity - MANAGER
Edit File: ova-core-functions.php
<?php if ( !defined( 'ABSPATH' ) ) { exit; } if( !function_exists( 'ovasermon_locate_template' ) ){ function ovasermon_locate_template( $template_name, $template_path = '', $default_path = '' ) { // Set variable to search in ovacoll-templates folder of theme. if ( ! $template_path ) : $template_path = 'ovasermon-templates/'; endif; // Set default plugin templates path. if ( ! $default_path ) : $default_path = OVASERMON_PLUGIN_PATH . 'templates/'; // Path to the template folder endif; // Search template file in theme folder. $template = locate_template( array( $template_path . $template_name // $template_name ) ); // Get plugins template file. if ( ! $template ) : $template = $default_path . $template_name; endif; return apply_filters( 'ovasermon_locate_template', $template, $template_name, $template_path, $default_path ); } } function ovasermon_get_template( $template_name, $args = array(), $tempate_path = '', $default_path = '' ) { if ( is_array( $args ) && isset( $args ) ) : extract( $args ); endif; $template_file = ovasermon_locate_template( $template_name, $tempate_path, $default_path ); if ( ! file_exists( $template_file ) ) : _doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $template_file ), '1.0.0' ); return; endif; include $template_file; } add_filter( 'chursy_header_customize', 'chursy_header_customize_sermon', 10, 1 ); function chursy_header_customize_sermon( $header ){ if( is_tax( 'cat_sermon' ) || get_query_var( 'cat_sermon' ) != '' || is_post_type_archive( 'sermon' ) ){ $header = get_theme_mod( 'header_archive_sermon', 'default' ); }else if( is_singular( 'sermon' ) ){ $header = get_theme_mod( 'header_single_sermon', 'default' ); } return $header; } add_filter( 'chursy_footer_customize', 'chursy_footer_customize_sermon', 10, 1 ); function chursy_footer_customize_sermon( $footer ){ if( is_tax( 'cat_sermon' ) || get_query_var( 'cat_sermon' ) != '' || is_post_type_archive( 'sermon' ) ){ $footer = get_theme_mod( 'archive_footer_sermon', 'default' ); }else if( is_singular( 'sermon' ) ){ $footer = get_theme_mod( 'single_footer_sermon', 'default' ); } return $footer; }