[wp-trac] [WordPress Trac] #35395: Provide a better gateway for code-based theme customizations with the Customizer

WordPress Trac noreply at wordpress.org
Wed Oct 19 18:14:23 UTC 2016


#35395: Provide a better gateway for code-based theme customizations with the
Customizer
-----------------------------------------+-------------------------
 Reporter:  celloexpressions             |       Owner:  johnregan3
     Type:  feature request              |      Status:  closed
 Priority:  normal                       |   Milestone:  4.7
Component:  Customize                    |     Version:
 Severity:  normal                       |  Resolution:  fixed
 Keywords:  has-screenshots needs-patch  |     Focuses:
-----------------------------------------+-------------------------
Changes (by westonruter):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"38829"]:
 {{{
 #!CommitTicketReference repository="" revision="38829"
 Customize: Introduce custom CSS for extending theme styles.

 * Custom CSS is associated with a given theme and is displayed in an
 inline `style` element at the `wp_head` hook after the `wp_print_styles`
 is called so that it overrides any enqueued stylesheets.
 * A `wp_get_custom_css()` function is used for accessing the CSS
 associated with the current theme (or another theme) and a
 `wp_get_custom_css` filter for manipulating it.
 * CSS is managed in customizer via a new "Additional CSS" section with a
 single `textarea` control.
 * `WP_Customize_Section::$description_hidden` is introduced for hiding
 extended descriptions in customizer sections behind a help toggle as done
 with panels.
 * CSS is stored in a `custom_css` post type with the theme (stylesheet)
 slug as the `post_name`.
 * `WP_Customize_Custom_CSS_Setting` is introduced to handle validation of
 CSS, previewing, and persisting the CSS to the `custom_css` post type.
 * The `custom_css` setting is tied to a new `unfiltered_css` capability
 which maps to `unfiltered_html` by default.
 * Escaping the message in the notification template is removed to allow
 markup (`code` tags) to be rendered.

 See https://make.wordpress.org/core/2016/10/11/feature-proposal-better-
 theme-customizations-via-custom-css-with-live-previews/

 Props johnregan3, celloexpressions, folletto, westonruter.
 Fixes #35395.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35395#comment:69>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list