Plugin Directory

Changeset 1685466


Ignore:
Timestamp:
06/26/2017 12:48:23 PM (9 years ago)
Author:
enteractie
Message:

added with and height variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dynamic-custom-header-replacement/tags/1.1/dynamic-custom-header-replacement.php

    r1623910 r1685466  
    66 * Author: enteractie - online exposure
    77 * Author URI: https://www.enteractie.nl
    8  * Version: 1.1
     8 * Version: 1.2
    99 */
    1010
     
    1212    if ( has_post_thumbnail() ) {
    1313        $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];
    1517    }
    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'].'">';
    1719}
    1820add_filter('get_header_image_tag', 'dchr_header_image_markup', 20, 3);
Note: See TracChangeset for help on using the changeset viewer.