[wp-trac] [WordPress Trac] #21627: Filter for custom-background CSS selector
WordPress Trac
noreply at wordpress.org
Sun Jul 6 05:57:23 UTC 2014
#21627: Filter for custom-background CSS selector
-------------------------+-----------------------------
Reporter: Horttcore | Owner: Horttcore
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Customize | Version: 3.4.1
Severity: trivial | Resolution:
Keywords: has-patch | Focuses:
-------------------------+-----------------------------
Changes (by westonruter):
* milestone: Awaiting Review => Future Release
Comment:
Replying to [comment:6 ocean90]:
> Having a filter in a custom callback doesn't sound like a good plan,
since we cannot ensure that plugin/theme authors are including the filter
in a custom callback too.
Right, when the `custom-background` theme support is added, the theme may
supply a custom`wp-head-callback` callback which would not be required to
the proposed filter. However, if there was a filter, then themes would
have much less cause to have to override `wp-head-callback`'s default
callback of `_custom_background_cb` to begin with. I would imagine that
providing a custom callback for `wp-head-callback` is usually due to a
different selector being needed.
As an alternative to providing a filter, there could be a new default
`element-selector` property of the `custom-background` theme support. A
custom theme callback would still need to honor `element-selector`, but
they also have to do this already for background repeats, positions, and
attachments. See [attachment:21627.diff].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21627#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list