Changeset 56583 for trunk/src/wp-content/themes/twentyeleven/functions.php
- Timestamp:
- 09/14/2023 11:23:59 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/functions.php
r56549 r56583 441 441 endif; // twentyeleven_admin_header_image() 442 442 443 444 if ( ! function_exists( 'twentyeleven_header_image' ) ) : 445 /** 446 * Custom header image markup displayed. 447 * 448 * @since Twenty Eleven 4.5 449 */ 450 function twentyeleven_header_image() { 451 $attrs = array( 452 'alt' => get_bloginfo( 'name', 'display' ), 453 ); 454 455 // Compatibility with versions of WordPress prior to 3.4. 456 if ( function_exists( 'get_custom_header' ) ) { 457 $custom_header = get_custom_header(); 458 $attrs['width'] = $custom_header->width; 459 $attrs['height'] = $custom_header->height; 460 } else { 461 $attrs['width'] = HEADER_IMAGE_WIDTH; 462 $attrs['height'] = HEADER_IMAGE_HEIGHT; 463 } 464 465 if ( function_exists( 'the_header_image_tag' ) ) { 466 the_header_image_tag( $attrs ); 467 return; 468 } 469 470 ?> 471 <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $attrs['width'] ); ?>" height="<?php echo esc_attr( $attrs['height'] ); ?>" alt="<?php echo esc_attr( $attrs['alt'] ); ?>" /> 472 <?php 473 } 474 endif; // twentyeleven_header_image() 475 443 476 /** 444 477 * Set the post excerpt length to 40 words.
Note: See TracChangeset
for help on using the changeset viewer.