*
* @link https://developer.wordpress.org/themes/functionality/custom-headers/
*
* @package Catch_Mag
*/
if ( ! function_exists( 'catch_mag_featured_image' ) ) :
/**
* Template for Featured Header Image from theme options
*
* To override this in a child theme
* simply create your own catch_mag_featured_image(), and that function will be used instead.
*
* @since Catch Base 1.0
*/
function catch_mag_featured_image() {
$header_media_title = get_theme_mod( 'catch_mag_header_media_title', esc_html__( 'Welcome to Catch Magazine', 'catch-mag' ) );
$header_media_text = get_theme_mod( 'catch_mag_header_media_text', esc_html__( 'Make things as simple as possible but no simpler.', 'catch-mag' ) );
if ( is_post_type_archive( 'jetpack-testimonial' ) ) :
$jetpack_options = get_theme_mod( 'jetpack_testimonials' );
if ( isset( $jetpack_options['featured-image'] ) && '' !== $jetpack_options['featured-image'] ) : ?>
ID, 'catch-mag-header-image', true );
if ( 'disable' === $individual_featured_image || ( 'default' === $individual_featured_image && 'disable' === $enable ) ) {
echo '';
return;
}
elseif ( 'enable' == $individual_featured_image && 'disable' === $enable ) {
catch_mag_featured_page_post_image();
}
}
// Check Homepage
if ( 'homepage' === $enable ) {
if ( is_front_page() || ( is_home() && is_front_page() ) ) {
catch_mag_featured_image();
}
}
// Check Excluding Homepage
if ( 'exclude-home' === $enable ) {
if ( is_front_page() || ( is_home() && is_front_page() ) ) {
return false;
} else {
catch_mag_featured_image();
}
}
elseif ( 'exclude-home-page-post' === $enable ) {
if ( is_front_page() || ( is_home() && is_front_page() ) ) {
return false;
} elseif ( is_singular() || ( class_exists( 'WooCommerce' ) && is_shop() ) || ( is_home() && ! is_front_page() ) ) {
catch_mag_featured_page_post_image();
} else {
catch_mag_featured_image();
}
}
// Check Entire Site
elseif ( 'entire-site' === $enable ) {
catch_mag_featured_image();
}
// Check Entire Site (Post/Page)
elseif ( 'entire-site-page-post' === $enable ) {
if ( is_singular() || ( is_home() && ! is_front_page() ) ) {
catch_mag_featured_page_post_image();
}
else {
catch_mag_featured_image();
}
}
// Check Page/Post
elseif ( 'pages-posts' === $enable ) {
if ( is_singular() ) {
catch_mag_featured_page_post_image();
}
}
} // catch_mag_featured_overall_image
endif;