[wp-trac] [WordPress Trac] #22221: get_custom_header() does not handle a default registered header

WordPress Trac noreply at wordpress.org
Sun Nov 11 01:35:02 UTC 2012


#22221: get_custom_header() does not handle a default registered header
--------------------------+-----------------------
 Reporter:  nacin         |       Owner:  nacin
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  3.5
Component:  Appearance    |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------

Comment (by jeffsebring):

 This should take care of it:


 {{{
                         if ( $_wp_default_headers ) {
                                 foreach ( $_wp_default_headers as $header
 => $details ) {
                                         $url = vsprintf( $details['url'],
 $directory_args );
                                         if ( $default_image == $url ) {
                                                 $data = $details;
                                                 $data['url'] = $url;
                                                 $data['thumbnail_url'] =
 vsprintf( $data['thumbnail_url'], $directory_args );
                                                 break;
                                         }
                                 }
                         }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22221#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list