[wp-trac] [WordPress Trac] #28586: Customiser fails to honour theme support defaults for background images

WordPress Trac noreply at wordpress.org
Thu Jun 19 13:33:34 UTC 2014


#28586: Customiser fails to honour theme support defaults for background images
----------------------------+-----------------------------
 Reporter:  philipjohn      |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Customize       |    Version:  3.9.1
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 When using add_theme_support() to set defaults for the background image,
 an unexpected consequence of using the customiser is that those defaults
 are ignored.

 For example, consider the following code, used in functions.php;
 {{{
 add_theme_support( 'custom-background', array(
         'default-image' => get_stylesheet_directory_uri() . '/bg.png',
         'default-repeat' => 'repeat-x',
         'default-position-x' => 'center',
         'default-attachment' => 'scroll',
 ) );
 }}}

 As would be expected, the customiser honours the "default-image" setting
 but the repeat, position-x and attachment settings are all ignored.
 Instead, the customiser chooses "repeat", "left" and "fixed" respectively.

 This means that the first Save in the customiser will overwrite the
 theme's default settings, changing the look and feel of the site despite
 the user not having changed any settings.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28586>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list