[wp-trac] [WordPress Trac] #48241: Using `add_theme_support( 'custom-background' )` enables both background color and background image.
WordPress Trac
noreply at wordpress.org
Mon Oct 7 18:30:09 UTC 2019
#48241: Using `add_theme_support( 'custom-background' )` enables both background
color and background image.
---------------------------+-----------------------------
Reporter: williampatton | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
Both custom color and custom image options for appear in the customizer
when `add_theme_support( 'custom-background' )` is defined. In some
instances it is designer preference to have no custom color option or no
custom image option. Currently it is not possible to have one or the other
- it is both or none.
The code responsible for this is here: https://github.com/WordPress
/wordpress-develop/blob/5.2/src/wp-includes/theme.php#L2535-L2545
It could be adjusted to first detect a newly added default value before
adding the support. That way would keep it working in a backwards
compatible way while allowing others to pick and choose which their theme
supports going forward.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48241>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list