Changeset 17770
- Timestamp:
- 04/29/2011 07:45:30 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-header.php
r17758 r17770 194 194 if ( isset( $_POST['removeheader'] ) ) { 195 195 check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); 196 set_theme_mod( 'header_image', ' ' );196 set_theme_mod( 'header_image', 'remove-header' ); 197 197 return; 198 198 } … … 547 547 </tr> 548 548 <?php endif; 549 if ( get_header_image() && !is_random_header_image()) : ?>549 if ( get_header_image() ) : ?> 550 550 <tr valign="top"> 551 551 <th scope="row"><?php _e( 'Remove Image' ); ?></th> … … 557 557 <?php endif; 558 558 559 if ( defined( 'HEADER_IMAGE' ) && !is_random_header_image()) : ?>559 if ( defined( 'HEADER_IMAGE' ) && '' != HEADER_IMAGE ) : ?> 560 560 <tr valign="top"> 561 561 <th scope="row"><?php _e( 'Reset Image' ); ?></th> -
trunk/wp-includes/theme.php
r17757 r17770 1430 1430 $url = get_theme_mod( 'header_image', $default ); 1431 1431 1432 if ( 'remove-header' == $url ) 1433 return false; 1434 1432 1435 if ( is_random_header_image() ) 1433 1436 $url = get_random_header_image(); … … 1489 1492 } else { 1490 1493 if ( "random-$type-image" == $header_image_mod ) 1494 return true; 1495 elseif ( 'default' == $type && empty( $header_image_mod ) && '' != get_random_header_image() ) 1491 1496 return true; 1492 1497 }
Note: See TracChangeset
for help on using the changeset viewer.