#47769 closed enhancement (fixed)
Add autocomplete support in code editor for php mode
Reported by: | ediamin | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Administration | Keywords: | has-patch has-dev-note |
Focuses: | javascript, administration | Cc: |
Description
In plugins editor or theme editor pages WP uses the code-editor.js to implement CodeMirror and its autocomplete feature. But in those pages we are settings $mode = 'php'
but code-editor.js supports $mode = 'application/x-httpd-php'
for autocompletion. This patch includes a small change to support for php mode also.
Attachments (2)
Change History (10)
#1
@
5 years ago
- Component changed from Editor to Administration
- Type changed from defect (bug) to enhancement
#5
@
5 years ago
Hi @ediamin, welcome to WordPress Trac!
Thanks for the patch, it works as expected in my testing.
Since wp_get_code_editor_settings() explicitly sets mode
to 'php'
when $type
is 'application/x-httpd-php'
, I think it's safe to just replace application/x-httpd-php
with php
here.
#6
@
5 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 45670:
#7
@
5 years ago
- Keywords has-dev-note added
Mentioned in the Miscellaneous Developer Focused Changes dev note for 5.3: https://make.wordpress.org/core/2019/10/15/miscellaneous-developer-focused-changes-in-5-3/
Introduced in [41376].