[wp-trac] [WordPress Trac] #35395: Provide a better gateway for code-based theme customizations with the Customizer
WordPress Trac
noreply at wordpress.org
Sun Oct 9 20:58:54 UTC 2016
#35395: Provide a better gateway for code-based theme customizations with the
Customizer
-----------------------------------------+-------------------------
Reporter: celloexpressions | Owner: johnregan3
Type: feature request | Status: assigned
Priority: normal | Milestone: 4.7
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: has-screenshots needs-patch | Focuses:
-----------------------------------------+-------------------------
Comment (by westonruter):
I also left a several comments as well. A few highlights:
* I think we should just re-use the core `textarea` control and skip
trying to add line numbers. A line number gutter reduces the overall width
in precious horizontal real estate. We can let an eventual CodeMirror or
some other real editor library provide that UI instead.
* The `validate_balanced_characters` method is going to need to be more
robust to account for the characters appearing in string literals
([https://github.com/xwp/wordpress-develop/pull/154#discussion_r82528441
comment]).
* Switch to only create the `custom_css` posts when there is actually data
being saved. No need to create these posts if there is no custom CSS
* Move the registration of the custom post type to
`create_initial_post_types()` instead of from the `WP_Custom_CSS` class.
Actually, I'm not sure about the best place to add CPT registration and
also the filters that customize its behavior. In the past I think the norm
for CPTs has been to add new global functions and add the filters in
`default-filters.php`. But is a practice we should continue?
See full review: https://github.com/xwp/wordpress-
develop/pull/154#pullrequestreview-3430614
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35395#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list