mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 18:24:31 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@41806 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -75,16 +75,16 @@ $file_types = wp_get_theme_file_editable_extensions( $theme );
|
||||
foreach ( $file_types as $type ) {
|
||||
switch ( $type ) {
|
||||
case 'php':
|
||||
$allowed_files += $theme->get_files( 'php', 1 );
|
||||
$allowed_files += $theme->get_files( 'php', -1 );
|
||||
$has_templates = ! empty( $allowed_files );
|
||||
break;
|
||||
case 'css':
|
||||
$style_files = $theme->get_files( 'css' );
|
||||
$style_files = $theme->get_files( 'css', -1 );
|
||||
$allowed_files['style.css'] = $style_files['style.css'];
|
||||
$allowed_files += $style_files;
|
||||
break;
|
||||
default:
|
||||
$allowed_files += $theme->get_files( $type );
|
||||
$allowed_files += $theme->get_files( $type, -1 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user