S3_Uploads::wp_filter_delete_file PHP Method

wp_filter_delete_file() public method

..). We have to filter the file_path to only return the relative section, to play nice with WordPress handling.
public wp_filter_delete_file ( string $file_path ) : string
$file_path string
return string
    public function wp_filter_delete_file($file_path)
    {
        $dir = wp_upload_dir();
        return str_replace(trailingslashit($dir['basedir']), '', $file_path);
    }