[wp-trac] [WordPress Trac] #19736: Add default body_class classes for Theme Names
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 4 18:48:05 UTC 2012
#19736: Add default body_class classes for Theme Names
-------------------------------------+------------------------------
Reporter: cais | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.3.1
Severity: minor | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------------------
Comment (by cais):
Replying to [comment:3 nacin]:
> The patch calls the expensive get_theme_data() function that reads
directly from the file.
>
> In order to implement this, we should use the existing theme slug.
Example:
>
> `'theme-' . sanitize_html_class( get_option( 'template' ) )`
>
> While it's a cool idea, I don't think it's going to be necessary for
most use cases.
`get_theme_data` may be expensive but I could not immediately think of
another method to resolve the 'child-theme' name. Therefore I used it for
both, but using the `get_option( 'template' )` approach is definitely
better for the Parent-Theme.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19736#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list