WordPress.org

Make WordPress Core

Changeset 45670


Ignore:
Timestamp:
07/25/2019 01:26:13 AM (14 months ago)
Author:
SergeyBiryukov
Message:

Code Editor: Check for correct mode value in wp.codeEditor.initialize to enable autocomplete support for PHP.

Props ediamin.
Fixes #47769.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/code-editor.js

    r43347 r45670  
    325325                } else if ( 'javascript' === innerMode ) {
    326326                    shouldAutocomplete = isAlphaKey || '.' === event.key;
    327                 } else if ( 'clike' === innerMode && 'application/x-httpd-php' === codemirror.options.mode ) {
     327                } else if ( 'clike' === innerMode && 'php' === codemirror.options.mode ) {
    328328                    shouldAutocomplete = 'keyword' === token.type || 'variable' === token.type;
    329329                }
Note: See TracChangeset for help on using the changeset viewer.