// Make a copy of the current theme.
foreach($theme_filesas$file){ // Skip directories as they are added automatically.
if( ! $file->isDir()){ // Get real and relative path for current file.
$file_path = wp_normalize_path($file); $relative_path = substr($file_path, strlen($theme_path) + 1 );