Ticket #25156: 25156.2.diff
File 25156.2.diff, 1.1 KB (added by , 12 years ago) |
---|
-
src/wp-includes/theme.php
897 897 function get_header_image() { 898 898 $url = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); 899 899 900 if ( 'remove-header' == $url )900 if ( 'remove-header' == $url || ( ! is_random_header_image() && empty( $url ) ) ) 901 901 return false; 902 902 903 903 if ( is_random_header_image() ) … … 1036 1036 * 1037 1037 * @since 3.4.0 1038 1038 * 1039 * @return object 1039 * @return mixed False if there is no header, or an object with the properties 1040 * 'url', 'thumbnail_url', 'width', and 'height'. 1040 1041 */ 1041 1042 function get_custom_header() { 1042 1043 global $_wp_default_headers; 1043 1044 1044 if ( is_random_header_image() ) { 1045 $url = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); 1046 1047 if ( 'remove-header' == $url || ( ! is_random_header_image() && empty( $url ) ) ) { 1048 return false; 1049 } elseif ( is_random_header_image() ) { 1045 1050 $data = _get_random_header_data(); 1046 1051 } else { 1047 1052 $data = get_theme_mod( 'header_image_data' );