[wp-trac] [WordPress Trac] #41897: Code Editor: Add reusable code editor Customizer control
WordPress Trac
noreply at wordpress.org
Sun Sep 17 00:23:26 UTC 2017
#41897: Code Editor: Add reusable code editor Customizer control
-------------------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.9
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+--------------------------
Description changed by westonruter:
Old description:
> With the introduction of CodeMirror in #12423 the Custom CSS
> functionality in the Customizer (#35395) was updated to make use of the
> new code editor. However, the initial integration in [41376] was not done
> in a way that would allow for the code to be re-used in other places
> (such as adding other instances of code editor controls) or to facilitate
> plugins to extend and customize how the Custom CSS control behaves
> (currently core and [https://github.com/Automattic/jetpack/issues/7776
> Jetpack conflict]).
>
> I suggest that the code that is currently hard-coded for the `custom_css`
> textarea control be abstracted into a general `WP_Customize_Code_Editor`
> control which then can be used for Custom CSS and also for adding code
> editing for anywhere else that a plugin may want it. It can then be
> cleanly extended by Jetpack.
New description:
With the introduction of CodeMirror in #12423 the Custom CSS functionality
in the Customizer (#35395) was updated to make use of the new code editor.
However, the initial integration in [41376] was not done in a way that
would allow for the code to be re-used in other places (such as adding
other instances of code editor controls) or to facilitate plugins to
extend and customize how the Custom CSS control behaves (currently core
and [https://github.com/Automattic/jetpack/issues/7776 Jetpack conflict]).
I suggest that the code that is currently hard-coded for the `custom_css`
textarea control be abstracted into a general
`WP_Customize_Code_Editor_Control` which then can be used for Custom CSS
and also for adding code editing for anywhere else that a plugin may want
it. It can then be cleanly extended by Jetpack.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41897#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list