'', 'default-text-color' => '000000', 'height' => 400, 'width' => 1800, 'flex-height' => true, 'flex-width' => true, 'default-image' => '', 'wp-head-callback' => 'calm_minimal_blog_theme_header_style', ) ) ); register_default_headers( array( 'header-bg' => array( 'url' => get_theme_file_uri( '/img/bg-img-min.png' ), 'thumbnail_url' => get_theme_file_uri( '/img/bg-img-min.png' ), 'description' => _x( 'Default', 'Default header image', 'calm-minimal-blog' ) ), ) ); } add_action('after_setup_theme', 'calm_minimal_blog', 9999999); if (!function_exists('calm_minimal_blog_theme_header_style')) : /** * Styles the header image and text displayed on the blog. * * @see calm_minimal_blog(). */ function calm_minimal_blog_theme_header_style() { $header_text_color = get_header_textcolor(); $header_image = get_header_image(); /* * If no custom options for text are set, let's bail. * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ). */ if (empty($header_image) && $header_text_color == get_theme_support('custom-header', 'default-text-color')) { return; } // If we get this far, we have custom styles. Let's do this. ?>