[wp-trac] [WordPress Trac] #29040: Customizer: Header Image not Updating when using static front page

WordPress Trac noreply at wordpress.org
Mon Jun 1 17:53:30 UTC 2015


#29040: Customizer: Header Image not Updating when using static front page
-------------------------------+------------------------------
 Reporter:  zhalsey            |       Owner:
     Type:  defect (bug)       |      Status:  reopened
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Customize          |     Version:  3.9
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  javascript
-------------------------------+------------------------------

Comment (by carlalexander):

 Yup, I'm having this issue in 4.2.2. The issue is exactly as Caroline's
 video shows it.

 I've narrowed it down `set_header_image` in `Custom_Image_Header`. The
 method receives `default` as the `$choice`. The method ends up doing
 nothing and just returning in this block of code:

 {{{
 if ( $uploaded && isset( $uploaded[ $choice ] ) ) {
         $header_image_data = $uploaded[ $choice ];
 } else {
         $this->process_default_headers();

         if ( isset( $this->default_headers[ $choice ] ) )
                 $header_image_data = $this->default_headers[ $choice ];
         else
                 return;
 }
 }}}

 There's no value for `$this->default_headers[ $choice ]` where `$choice =
 'default'`. That's because the `default-image` in `add_theme_support(
 'custom-header' )` doesn't seem to make it there at all.

 I did a bit more testing on that. It doesn't seem to be added to the
 `default_headers` array. For the function to behave as it should you'd
 need `$this->default_headers['default']` to be equal to the `default-
 image` value. I don't think that was ever the case.

 Switching themes probably works because it clears the `theme_mods` option
 in the database which reset the default header image.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29040#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list