public function wp_filter_delete_file($file_path) { $dir = wp_upload_dir(); return str_replace(trailingslashit($dir['basedir']), '', $file_path); }