get_template_directory_uri() . '/images/defalult-logo.png', 'flex-width' => true, )); //Custome Header Image $defaults = array( 'default-image' => FALSE, 'width' => 1500, 'height' => 140, 'flex-height' => TRUE, 'flex-width' => TRUE, 'uploads' => true, 'random-default' => false, 'header-text' => false, ); add_theme_support( 'custom-header', $defaults ); //Custom Background Image $bg_default_arg = array( 'default-image' => get_template_directory_uri() . '/images/default-bg.png', 'default-preset' => 'default', 'default-position-x' => 'center', 'default-position-y' => 'center', 'default-size' => 'auto', 'default-repeat' => 'repeat', 'default-attachment' => 'scroll', 'default-color' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support('custom-background', $bg_default_arg); } add_action('after_setup_theme', 'btb_require_theme_support'); /** * Add support for Vertical Featured Images */ if ( ! function_exists( 'mytheme_vertical_check' ) ) : function mytheme_vertical_check( $html, $post_id, $post_thumbnail_id, $size, $attr ) { $image_data = wp_get_attachment_image_src( $post_thumbnail_id , 'large' ); //Get the image width and height from the data provided by wp_get_attachment_image_src() $width = $image_data[1]; $height = $image_data[2]; if ( $height > $width ) { $html = str_replace( 'attachment-', 'vertical-image attachment-', $html ); } return $html; } endif; add_filter( 'post_thumbnail_html', 'mytheme_vertical_check', 10, 5 );