Code Editor: Check for correct mode
value in wp.codeEditor.initialize
to enable autocomplete support for PHP.
Props ediamin. Fixes #47769. git-svn-id: https://develop.svn.wordpress.org/trunk@45670 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
85f0ec3eba
commit
d758aa802d
@ -324,7 +324,7 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
|
||||
' ' === event.key && /:\s+$/.test( lineBeforeCursor );
|
||||
} else if ( 'javascript' === innerMode ) {
|
||||
shouldAutocomplete = isAlphaKey || '.' === event.key;
|
||||
} else if ( 'clike' === innerMode && 'application/x-httpd-php' === codemirror.options.mode ) {
|
||||
} else if ( 'clike' === innerMode && 'php' === codemirror.options.mode ) {
|
||||
shouldAutocomplete = 'keyword' === token.type || 'variable' === token.type;
|
||||
}
|
||||
if ( shouldAutocomplete ) {
|
||||
|
Loading…
Reference in New Issue
Block a user