- Timestamp:
- 11/18/2016 06:42:16 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyseventeen/functions.php
r39261 r39291 426 426 427 427 /** 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 /** 428 443 * Add custom image sizes attribute to enhance responsive image functionality 429 444 * for post thumbnails.
Note: See TracChangeset
for help on using the changeset viewer.