示例#1
0
 private function delete_report($filename)
 {
     if (!empty($filename) && !is_string($filename)) {
         return new WP_Error('invalid-argument', 'The delete-report function takes a string representing an individual report.');
     }
     $upload_path = Ithemes_Sync_Functions::get_upload_reports_dir();
     if (!empty($upload_path) && wp_is_writable($upload_path)) {
         @unlink($upload_path . '/' . $filename);
         return true;
     }
     return false;
 }