[wp-trac] [WordPress Trac] #20871: Removing header image does not remove header_image_data theme mod

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 11 19:02:49 UTC 2012


#20871: Removing header image does not remove header_image_data theme mod
-------------------------------------+--------------------------
 Reporter:  kovshenin                |       Owner:  koopersmith
     Type:  defect (bug)             |      Status:  reopened
 Priority:  highest omg bbq          |   Milestone:  3.4
Component:  Appearance               |     Version:  3.4
 Severity:  blocker                  |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+--------------------------
Changes (by nacin):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 This also applies for background_image_thumb, which can break the admin
 preview.

 Rather than reworking the customizer to also set this value, we can hack
 in something like this:
  * Instead of `get_theme_mod( 'background_image_thumb',
 get_background_image() )`, we also replace a set-but-empty theme mod value
 with get_background_image(), like this:
 {{{
 $thumb = get_theme_mod( 'background_image_thumb' );
 if ( ! $thumb )
         $thumb = get_background_image();
 }}}
  * Also, the customizer would need to consistently remove_theme_mod(
 'background_image_thumb' ) whenever it set the background_image theme mod.

 Or, we can just make it always set background_image_thumb to be either the
 full URL or the thumbnail URL.

 Or, we can just get rid of background_image_thumb entirely. I don't really
 see the usefulness as we only show a single preview background (one
 image), not a tile of uploaded backgrounds.

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


More information about the wp-trac mailing list