Ticket #22221: 22221.2.diff
| File 22221.2.diff, 1.2 KB (added by nacin, 7 months ago) |
|---|
-
wp-includes/theme.php
1031 1031 $data = _get_random_header_data(); 1032 1032 } else { 1033 1033 $data = get_theme_mod( 'header_image_data' ); 1034 if ( ! $data && isset( $_wp_default_headers ) &¤t_theme_supports( 'custom-header', 'default-image' ) ) {1034 if ( ! $data && current_theme_supports( 'custom-header', 'default-image' ) ) { 1035 1035 $directory_args = array( get_template_directory_uri(), get_stylesheet_directory_uri() ); 1036 $default_image = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args ); 1036 $data['url'] = $data['thumbnail_url'] = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args ); 1037 if ( ! empty( $_wp_default_headers ) ) { 1037 1038 foreach ( (array) $_wp_default_headers as $header => $details ) { 1038 1039 $url = vsprintf( $details['url'], $directory_args ); 1039 if ( $d efault_image== $url ) {1040 if ( $data['url'] == $url ) { 1040 1041 $data = $details; 1041 1042 $data['url'] = $url; 1042 1043 $data['thumbnail_url'] = vsprintf( $data['thumbnail_url'], $directory_args ); 1043 1044 break; 1044 1045 } 1045 1046 } 1047 } 1046 1048 } 1047 1049 } 1048 1050
