'000', // Header image default 'default-image' => trailingslashit( esc_url ( get_template_directory_uri() ) ) . 'images/headers/header-image.jpg', // Set height and width, with a maximum value for the width. 'height' => 480, 'width' => 1920, // Support flexible height and width. 'flex-height' => true, 'flex-width' => true, // Random image rotation off by default. 'random-default' => false, // Callbacks for styling the header and the admin preview. 'wp-head-callback' => 'catchevolution_header_style', 'admin-head-callback' => 'catchevolution_admin_header_style', 'admin-preview-callback' => 'catchevolution_admin_header_image', ); $args = apply_filters( 'custom-header', $args ); // Add support for custom header add_theme_support( 'custom-header', $args ); } add_action( 'after_setup_theme', 'catchevolution_custom_header_setup' ); if ( ! function_exists( 'catchevolution_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @since Catch Evolution 1.0 */ function catchevolution_header_style() { $options = catchevolution_get_options(); $defaults = catchevolution_get_defaults(); $text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. if ( get_theme_support( 'custom-header', 'default-text-color' ) === $text_color ) return; // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * * @since Catch Evolution 1.0 */ function catchevolution_admin_header_style() { $options = catchevolution_get_options(); $defaults = catchevolution_get_defaults(); ?> Header admin panel. * * @since Catch Evolution 1.0 */ function catchevolution_admin_header_image() { ?>
'; // Getting data from Theme Options $options = catchevolution_get_options(); $defaults = catchevolution_get_defaults(); $sitedetails = $options['site_title_above']; $seperatelogo = $options['seperate_logo']; $removetitle = $options['remove_site_title']; $removedesc = $options['remove_site_description']; // Check Logo if ( function_exists( 'has_custom_logo' ) ) { if ( has_custom_logo() ) { $text_color = get_header_textcolor(); if ( empty( $sitedetails ) && ( 'blank' == $text_color ) ) { $classses = 'title-disable'; } elseif ( empty( $sitedetails ) && ( 'blank' != $text_color ) && ( empty( $removetitle ) || empty( $removedesc ) ) && empty( $seperatelogo ) ) { $classses = 'title-right'; } elseif ( !empty( $sitedetails ) && ( 'blank' != $text_color ) && ( empty( $removetitle ) || empty( $removedesc ) ) && empty( $seperatelogo ) ) { $classses = 'title-left'; } else { $classses = 'clear'; } $catchevolution_logo = ' '; } } elseif ( empty( $options['remove_header_logo'] ) ) { //@remove elseif block when WP v4.8 is released echo ''; $catchevolution_logo = ''; if ( empty( $sitedetails ) && ( 'blank' == $text_color ) ) { $classses = 'title-disable'; } elseif ( empty( $sitedetails ) && ( 'blank' != $text_color ) && ( empty( $removetitle ) || empty( $removedesc ) ) && empty( $seperatelogo ) ) { $classses = 'title-right'; } elseif ( !empty( $sitedetails ) && ( 'blank' != $text_color ) && ( empty( $removetitle ) || empty( $removedesc ) ) && empty( $seperatelogo ) ) { $classses = 'title-left'; } else { $classses = 'clear'; } $catchevolution_logo .= ''; } set_transient( 'catchevolution_logo', $catchevolution_logo, 86940 ); } echo $catchevolution_logo; } // catchevolution_logo endif; if ( ! function_exists( 'catchevolution_site_details' ) ) : /** * Template for Site Details * * To override this in a child theme * simply create your own catchevolution_header_details(), and that function will be used instead. * * @since Catch Evolution 1.0 */ function catchevolution_site_details() { // Getting data from Theme Options $options = catchevolution_get_options(); $defaults = catchevolution_get_defaults(); $removetitle = $options['remove_site_title']; $removedesc = $options['remove_site_description']; $seperatelogo = $options['seperate_logo']; if ( !empty ( $seperatelogo ) ) { $classses = 'clear'; } else { $classses = 'normal'; }; ?>

'; if ( empty( $sitedetails ) ) { echo catchevolution_logo(); echo catchevolution_site_details(); } else { echo catchevolution_site_details(); echo catchevolution_logo(); } echo ''; } endif; //catchevolution_headerdetails add_action( 'catchevolution_headercontent', 'catchevolution_headerdetails', 10 ); if ( ! function_exists( 'catchevolution_header_search' ) ) : /** * Header Search Box * * @since Catch Evolution 1.0 */ function catchevolution_header_search() { ?> ID ) && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) && $image[1] >= 1920 ) : // Houston, we have a new header image! echo '
'; echo get_the_post_thumbnail( $post->ID, 'full' ); echo '
'; elseif ( get_header_image() ) : ?>