Changeset 4181
- Timestamp:
- 04/09/2011 02:21:55 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-themes/bp-default/functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/functions.php
r4113 r4181 274 274 global $post; 275 275 276 if ( is_singular() && has_post_thumbnail( $post->ID ) ) { 276 $header_image = ''; 277 278 if ( is_singular() && current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail( $post->ID ) ) { 277 279 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ); 278 280 … … 280 282 if ( !empty( $image ) && $image[1] >= HEADER_IMAGE_WIDTH ) 281 283 $header_image = $image[0]; 284 285 } else { 286 $header_image = get_header_image(); 282 287 } 283 288 284 289 if ( empty( $header_image ) ) 285 $header_image = get_header_image();290 return; 286 291 ?> 292 287 293 <style type="text/css"> 288 294 #header { background-image: url(<?php echo $header_image ?>); } … … 293 299 <?php } ?> 294 300 </style> 301 295 302 <?php 296 303 }
Note: See TracChangeset
for help on using the changeset viewer.