400, 'height' => 60, 'flex-width' => true, 'flex-height' => true, 'default-text-color' => cakifo_get_default_link_color_no_hash(), 'wp-head-callback' => 'cakifo_header_style', 'admin-head-callback' => 'cakifo_admin_header_style', 'admin-preview-callback' => 'cakifo_admin_header_image', ) ); /** * Register the default logo. */ register_default_headers( array( 'logo' => array( 'description' => __( 'Logo.png from the Cakifo images folder', 'cakifo' ), 'url' => get_template_directory_uri() . '/images/logo.png', 'thumbnail_url' => get_template_directory_uri() . '/images/logo.png', 'width' => 300, 'height' => 59 ) ) ); /** * Register child theme default logo if images/logo.png exists. */ if ( is_child_theme() && file_exists( get_stylesheet_directory() . '/images/logo.png' ) ) : register_default_headers( array( 'childtheme_logo' => array( 'description' => __( 'Logo.png from the Cakifo child theme images folder', 'cakifo' ), 'url' => get_stylesheet_directory_uri() . '/images/logo.png', 'thumbnail_url' => get_stylesheet_directory_uri() . '/images/logo.png', ) ) ); endif; /** * Styles the header image and text displayed on the blog. * * @since Cakifo 1.0.0 */ function cakifo_header_style() { $default_text_color = get_theme_support( 'custom-header', 'default-text-color' ); $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. if ( $header_text_color == $default_text_color ) return; // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * * @since Cakifo 1.4.0 */ function cakifo_admin_header_image() { ?>

'; ?>


Header admin panel. * * @since Cakifo 1.0.0 */ function cakifo_admin_header_style() { ?> Header`. * * @since Cakifo 1.0.0 * @return string The site title. Either as text, as an image or both. */ function cakifo_logo() { // Get the site title. $title = get_bloginfo( 'name' ); $maybe_image = ''; // Get header image. if ( get_header_image() ) { $maybe_image = '' . esc_attr( $title ) . ''; } // Generate the markup. $output = sprintf( '

%s%s

', $maybe_image, $title ); // Display the site title and allow child themes to overwrite the final output. echo apply_atomic( 'site_title', $output ); }