/** * Set up the WordPress core custom header feature. * * @uses twentyseventeen_header_style() */ function twentyseventeen_custom_header_setup() { /** * Filter Twenty Seventeen custom-header support arguments. * * @since Twenty Seventeen 1.0 * * @param array $args { * An array of custom-header support arguments. * * @type string $default-image Default image of the header. * @type string $default_text_color Default color of the header text. * @type int $width Width in pixels of the custom header image. Default 954. * @type int $height Height in pixels of the custom header image. Default 1300. * @type string $wp-head-callback Callback function used to styles the header image and text * displayed on the blog. * @type string $flex-height Flex support for height of header. * } */ add_theme_support('custom-header', apply_filters('twentyseventeen_custom_header_args', array('default-image' => get_parent_theme_file_uri('/assets/images/header.jpg'), 'width' => 2000, 'height' => 1200, 'flex-height' => true, 'video' => true, 'wp-head-callback' => 'twentyseventeen_header_style'))); register_default_headers(array('default-image' => array('url' => '%s/assets/images/header.jpg', 'thumbnail_url' => '%s/assets/images/header.jpg', 'description' => __('Default Header Image', 'twentyseventeen')))); }
/** * @ticket 18302 * * @dataProvider data_theme_files */ public function test_theme_file_uri_returns_valid_uri($file, $expected_theme, $existence) { $uri = get_theme_file_uri($file); $parent_uri = get_parent_theme_file_uri($file); $this->assertSame(esc_url_raw($uri), $uri); $this->assertSame(esc_url_raw($parent_uri), $parent_uri); }