WordPress.org

Ready to get started?Download WordPress

Forums

Twenty eleven theme header, is this intentional? (3 posts)

  1. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    has_post_thumbnail( $post->ID ) &&
    	( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
    	$image[1] >= HEADER_IMAGE_WIDTH ) :
    	// Houston, we have a new header image!

    OK, first let me preface this by saying I pretty much know jack poop about code! Just enough to break my site.

    But looking at this code for the custom header image out of twentyeleven, the commented portion references that the following will be SRC WIDTH HEIGHT

    However, the actual code repeats the width, so it is referencing SRC WIDTH WIDTH

    Is this a bug, or intentional?

  2. Mark / t31os
    Moderator
    Posted 3 years ago #

    Looks like an oversight with the code, possibly constant names were copy and pasted, except the final copy->paste wasn't done correctly(i know i often hit the wrong key when i'm intending to hit CTRL+C for copy), which will result in a paste of the penultimate data that was copied.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic