[wp-trac] [WordPress Trac] #41897: Code Editor: Add reusable code editor Customizer control

WordPress Trac noreply at wordpress.org
Thu Sep 21 23:03:09 UTC 2017


#41897: Code Editor: Add reusable code editor Customizer control
---------------------------------------------+--------------------------
 Reporter:  westonruter                      |       Owner:  westonruter
     Type:  defect (bug)                     |      Status:  closed
 Priority:  high                             |   Milestone:  4.9
Component:  Customize                        |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch commit needs-dev-note  |     Focuses:
---------------------------------------------+--------------------------
Changes (by westonruter):

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


Comment:

 In [changeset:"41558"]:
 {{{
 #!CommitTicketReference repository="" revision="41558"
 Customize: Introduce extensible code editor Customizer control for
 CodeMirror.

 * Adds `WP_Customize_Code_Editor_Control` and
 `wp.customize.CodeEditorControl()`.
 * Control respects user preference for syntax highlighting, showing a
 textarea when user opts out.
 * Code editor control takes the ad hoc code for Additional CSS and makes
 it reusable and extensible, for Additional CSS in core and plugins to use
 (such as Jetpack).
 * Replace `settings` arg in `wp_enqueue_code_editor()` with separate args
 for `codemirror`, `csslint`, `jshint`, and `htmlhint`.
 * Prefix `codemirror` script and style handles with `wp-` to prevent
 collisions, as also the object is exported as `wp.CodeMirror` in JS.
 * Reduce indent size in Customizer code editor instances and Custom HTML
 widget to use tab size of 2 instead of 4 to save on space.

 See #12423, #38707, #35395.
 Fixes #41897.
 }}}

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


More information about the wp-trac mailing list