WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/10/17 05:33:57 (3 months ago)
Author:
pento
Message:

File Editor: Add support for more than one sub-directory level.

The theme and plugin editors now list all files in the selected theme or plugin, recursing through subdirectories as necessary.

Props WraithKenny, schlessera, chsxf, MikeHansenMe, Daedalon, valendesigns, westonruter, pento.
Fixes #6531.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/theme-editor.php

    r41774 r41806  
    7676    switch ( $type ) { 
    7777        case 'php': 
    78             $allowed_files += $theme->get_files( 'php', 1 ); 
     78            $allowed_files += $theme->get_files( 'php', -1 ); 
    7979            $has_templates = ! empty( $allowed_files ); 
    8080            break; 
    8181        case 'css': 
    82             $style_files = $theme->get_files( 'css' ); 
     82            $style_files = $theme->get_files( 'css', -1 ); 
    8383            $allowed_files['style.css'] = $style_files['style.css']; 
    8484            $allowed_files += $style_files; 
    8585            break; 
    8686        default: 
    87             $allowed_files += $theme->get_files( $type ); 
     87            $allowed_files += $theme->get_files( $type, -1 ); 
    8888            break; 
    8989    } 
Note: See TracChangeset for help on using the changeset viewer.