Changeset 22669 for trunk/wp-includes/theme.php
- Timestamp:
- 11/19/2012 06:59:25 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r22545 r22669 1035 1035 } else { 1036 1036 $data = get_theme_mod( 'header_image_data' ); 1037 if ( ! $data && isset( $_wp_default_headers ) &¤t_theme_supports( 'custom-header', 'default-image' ) ) {1037 if ( ! $data && current_theme_supports( 'custom-header', 'default-image' ) ) { 1038 1038 $directory_args = array( get_template_directory_uri(), get_stylesheet_directory_uri() ); 1039 $default_image = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args ); 1040 foreach ( (array) $_wp_default_headers as $header => $details ) { 1041 $url = vsprintf( $details['url'], $directory_args ); 1042 if ( $default_image == $url ) { 1043 $data = $details; 1044 $data['url'] = $url; 1045 $data['thumbnail_url'] = vsprintf( $data['thumbnail_url'], $directory_args ); 1046 break; 1039 $data = array(); 1040 $data['url'] = $data['thumbnail_url'] = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args ); 1041 if ( ! empty( $_wp_default_headers ) ) { 1042 foreach ( (array) $_wp_default_headers as $default_header ) { 1043 $url = vsprintf( $default_header['url'], $directory_args ); 1044 if ( $data['url'] == $url ) { 1045 $data = $default_header; 1046 $data['url'] = $url; 1047 $data['thumbnail_url'] = vsprintf( $data['thumbnail_url'], $directory_args ); 1048 break; 1049 } 1047 1050 } 1048 1051 }
Note: See TracChangeset
for help on using the changeset viewer.