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

WordPress Trac noreply at wordpress.org
Wed Nov 23 17:33:24 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:
-----------------------------------------+-------------------------

Comment (by westonruter):

 In [changeset:"39350"]:
 {{{
 #!CommitTicketReference repository="" revision="39350"
 Customize: Refactor logic for updating `custom_css` posts by introducing
 `wp_update_custom_css_post()` function and renaming update filter.

 * Moves logic from `WP_Customize_Custom_CSS_Setting::update()` into a re-
 usable `wp_update_custom_css_post()` function, useful for future REST API
 endpoint, WP-CLI command, or plugin migrations.
 * Renames `customize_update_custom_css_post_content_args` filter to
 `update_custom_css_data` and improves the naming of the parameters.
 Instead of passing `post_content` and `post_content_filtered` the filtered
 array now contains `css` and `preprocessed` respectively.
 * The second context param for the `update_custom_css_data` filter is now
 an array of the original args passed to `wp_update_custom_css_post()` and
 there is now no more `$setting` arg since it isn't necessarily being
 called in the customizer context.

 Props westonruter, georgestephanis.
 See #35395.
 Fixes #38672.
 }}}

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


More information about the wp-trac mailing list