mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Delete plugin confirmation from DD32. see #7091
git-svn-id: https://develop.svn.wordpress.org/trunk@8095 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -41,6 +41,34 @@ function get_real_file_to_edit( $file ) {
|
||||
|
||||
return $real_file;
|
||||
}
|
||||
//$folder = Full path to folder
|
||||
//$levels = Levels of folders to follow, Default: 100 (PHP Loop limit)
|
||||
function list_files( $folder = '', $levels = 100 ) {
|
||||
if( empty($folder) )
|
||||
return false;
|
||||
|
||||
if( ! $levels )
|
||||
return false;
|
||||
|
||||
$files = array();
|
||||
if ( $dir = @opendir( $folder ) ) {
|
||||
while (($file = readdir( $dir ) ) !== false ) {
|
||||
if ( in_array($file, array('.', '..') ) )
|
||||
continue;
|
||||
if ( is_dir( $folder . '/' . $file ) ) {
|
||||
$files2 = list_files( $folder . '/' . $file, $levels - 1);
|
||||
if( $files2 )
|
||||
$files = array_merge($files, $files2 );
|
||||
else
|
||||
$files[] = $folder . '/' . $file . '/';
|
||||
} else {
|
||||
$files[] = $folder . '/' . $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
@closedir( $dir );
|
||||
return $files;
|
||||
}
|
||||
|
||||
function get_temp_dir() {
|
||||
if ( defined('WP_TEMP_DIR') )
|
||||
|
||||
Reference in New Issue
Block a user