Changeset 1685466
- Timestamp:
- 06/26/2017 12:48:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamic-custom-header-replacement/tags/1.1/dynamic-custom-header-replacement.php
r1623910 r1685466 6 6 * Author: enteractie - online exposure 7 7 * Author URI: https://www.enteractie.nl 8 * Version: 1. 18 * Version: 1.2 9 9 */ 10 10 … … 12 12 if ( has_post_thumbnail() ) { 13 13 $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); 14 $attr['src'] = $thumbnail[0]; 14 $attr['src'] = $thumbnail[0]; 15 $attr['width'] = $thumbnail[1]; 16 $attr['height'] = $thumbnail[2]; 15 17 } 16 return '<img src="'.$attr['src'].'" width="'.$attr['width'].'" height="'.$attr['height'].'" alt="'.$attr['alt'].'" srcset="'.$attr['srcset'].'" sizes="'.$attr['sizes'].'">';18 return '<img src="'.$attr['src'].'" width="'.$attr['width'].'" height="'.$attr['height'].'" alt="'.$attr['alt'].'">'; 17 19 } 18 20 add_filter('get_header_image_tag', 'dchr_header_image_markup', 20, 3);
Note: See TracChangeset
for help on using the changeset viewer.