| | 428 | * Filter the `sizes` value in the header image markup. |
| | 429 | * |
| | 430 | * @since Twenty Seventeen 1.0 |
| | 431 | * |
| | 432 | * @param string $html The HTML image tag markup being filtered. |
| | 433 | * @param object $header The custom header object returned by 'get_custom_header()'. |
| | 434 | * @param array $attr Array of the attributes for the image tag. |
| | 435 | * @return string The filtered header image HTML. |
| | 436 | */ |
| | 437 | function twentyseventeen_header_image_tag( $html, $header, $attr ) { |
| | 438 | return str_replace( $attr['sizes'], '100vw', $html ); |
| | 439 | } |
| | 440 | add_filter ( 'get_header_image_tag', 'twentyseventeen_header_image_tag', 10, 3 ); |
| | 441 | |
| | 442 | /** |