[wp-trac] [WordPress Trac] #21627: Filter for custom-background CSS selector
WordPress Trac
noreply at wordpress.org
Thu Sep 17 23:31:30 UTC 2015
#21627: Filter for custom-background CSS selector
-------------------------+-----------------------------
Reporter: Horttcore | Owner: Horttcore
Type: enhancement | Status: new
Priority: low | Milestone: Future Release
Component: Customize | Version: 3.4.1
Severity: minor | Resolution:
Keywords: has-patch | Focuses:
-------------------------+-----------------------------
Changes (by peterwilsoncc):
* keywords: needs-patch needs-refresh => has-patch
Comment:
Refreshed against trunk in [attachment:21627.6.diff]
Renamed the theme support options and added the ability to customise the
selector in the CSS, default values are:
{{{#!php
add_theme_support( 'custom-background', array(
'background-element' => 'body',
'background-class' => 'custom-background',
'background-selector' => '%1$s.%2$s', // background-element
.background-class
) );
}}}
An example customisation in a theme's `function.php` might be:
{{{#!php
add_theme_support( 'custom-background', array(
'background-element' => 'html',
'background-class' => 'has-custom-background',
'background-selector' => '.has-custom-background',
) );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21627#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list