WordPress.org

Make WordPress Core

Ticket #25229: plugin-editor.php.patch

File plugin-editor.php.patch, 817 bytes (added by a.hoereth, 6 years ago)
  • wp-admin/plugin-editor.php

     
    9494
    9595        // List of allowable extensions
    9696        $editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include');
     97
     98        /**
     99         * File type extensions editable in the plugin editor.
     100         *
     101         * If a plugin ships with files with other file extensions than the default
     102         * and wants the user to be able to edit those it should use this filter.
     103         *
     104         * @since 2.8
     105         *
     106         * @param array $editable_extensions Currently editable extensions.
     107         */
    97108        $editable_extensions = (array) apply_filters('editable_extensions', $editable_extensions);
    98109
    99110        if ( ! is_file($real_file) ) {