WordPress.org

Make WordPress Core

Ticket #47769: 47769-2.diff

File 47769-2.diff, 748 bytes (added by ediamin, 14 months ago)

Update patch. Only using php and remove application/x-httpd-php

  • src/js/_enqueues/wp/code-editor.js

    diff --git a/src/js/_enqueues/wp/code-editor.js b/src/js/_enqueues/wp/code-editor.js
    index ea04cea2bc..25a21a5aeb 100644
    a b if ( 'undefined' === typeof window.wp.codeEditor ) { 
    324324                                                ' ' === event.key && /:\s+$/.test( lineBeforeCursor );
    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                                }
    330330                                if ( shouldAutocomplete ) {