[wp-trac] [WordPress Trac] #39461: default-preset option for custom background cannot be set by default

WordPress Trac noreply at wordpress.org
Wed Jan 4 09:29:38 UTC 2017


#39461: default-preset option for custom background cannot be set by default
--------------------------------+-----------------------------
 Reporter:  cristian-ungureanu  |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Customize           |    Version:  4.7
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 I am trying to set a custom background by default for this theme
 https://wordpress.org/themes/islemag/ . This is my code:

 {{{
                 add_theme_support( 'custom-background', array(
                         'default-image'          =>
 get_template_directory_uri() . '/img/islemag-background.jpg',
                         'default-preset'         => 'fill',
                         'default-repeat'         => 'no-repeat',
                         'default-position-x'     => 'center',
                         'default-attachment'     => 'fixed',

                 ) );
 }}}

 When I open the customizer, the default preset option is set on "fill
 screen" but the background image is still small. Everything works great if
 I change the default preset and then change it back on "fill screen"

 I talked with developers in core channel on slack and @celloexpressions
 told me this:
 ''"Currently you need to define the default for each individual property
 (size, repeat, etc.) in addition to defining the preset. It would probably
 be better for consistency if each property is set based on the preset if
 the theme sets a preset."''

 Tried to set each property for custom background but with no luck.

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


More information about the wp-trac mailing list