WordPress.org

Make WordPress Core

Ticket #22924: theme-editor.patch

File theme-editor.patch, 611 bytes (added by pross, 3 years ago)
  • wp-admin/theme-editor.php

    diff --git wp-admin/theme-editor.php wp-admin/theme-editor.php
    index c9adabe0cd4b21a289efc727a0b59afd912bfca9..f64e20c9dffaadcbc8d7df6dccbb65d26303ce7f 100644
    $allowed_files = $theme->get_files( 'php', 1 ); 
    6262$has_templates = ! empty( $allowed_files ); 
    6363$style_files = $theme->get_files( 'css' ); 
    6464$allowed_files['style.css'] = $style_files['style.css']; 
    65 $allowed_files += $style_files; 
     65$allowed_files += apply_filters( 'wp_theme_editor_filetypes', $style_files, $theme ); 
    6666 
    6767if ( empty( $file ) ) { 
    6868        $relative_file = 'style.css';