diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php index 2167c1ac74..61040ae060 100644 --- a/src/wp-admin/plugin-editor.php +++ b/src/wp-admin/plugin-editor.php @@ -94,7 +94,15 @@ default: // List of allowable extensions $editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include'); - $editable_extensions = (array) apply_filters('editable_extensions', $editable_extensions); + + /** + * Filter file type extensions editable in the plugin editor. + * + * @since 2.8.0 + * + * @param array $editable_extensions An array of editable plugin file extensions. + */ + $editable_extensions = (array) apply_filters( 'editable_extensions', $editable_extensions ); if ( ! is_file($real_file) ) { wp_die(sprintf('

%s

', __('No such file exists! Double check the name and try again.')));