diff --git src/wp-content/themes/twentyseventeen/functions.php src/wp-content/themes/twentyseventeen/functions.php
index b066494..2b616a8 100644
|
|
|
function twentyseventeen_content_image_sizes_attr( $sizes, $size ) { |
| 425 | 425 | add_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr', 10, 2 ); |
| 426 | 426 | |
| 427 | 427 | /** |
| | 428 | * Filter the `sizes` value in the header image markup. |
| | 429 | * |
| | 430 | * @since 4.7.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 | /** |
| 428 | 443 | * Add custom image sizes attribute to enhance responsive image functionality |
| 429 | 444 | * for post thumbnails. |
| 430 | 445 | * |