Commit a91d398
committed
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@41558 602fd350-edb4-49c9-b593-d223f7449a821 parent 7a5d0cc commit a91d398
8 files changed
Lines changed: 404 additions & 234 deletions
File tree
- src
- wp-admin
- css
- js
- wp-includes
- customize
- widgets
- tests/phpunit/tests/customize
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
1167 | | - | |
| 1167 | + | |
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
1171 | 1171 | | |
1172 | 1172 | | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1173 | 1187 | | |
1174 | 1188 | | |
1175 | 1189 | | |
| |||
1180 | 1194 | | |
1181 | 1195 | | |
1182 | 1196 | | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | 1197 | | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | 1198 | | |
1191 | 1199 | | |
1192 | 1200 | | |
| |||
0 commit comments