You appear to be a bot. Output may be restricted
Description
Non generic routine to delete the uploaded files
Usage
Tests_nivo_php::delete_uploaded_files( $attachment );
Parameters
- $attachment
- ( mixed ) required –
Returns
void
TO DO
Improve logic to work with specific upload files
Source
File name: oik-nivo-slider/tests/test-nivo-php.php
Lines:
1 to 11 of 11
function delete_uploaded_files( $attachment ) { //print_r( $attachment ); $dir = wp_upload_dir(); $path = bw_array_get( $dir, "path", null ); $this->assertNotNull( $path ); $files = glob( $path . '/screenshot-1*.jpg' ); if ( $files ) { array_map( "unlink", $files ); } // $files = glob( $path . '/screenshot-1*.jpg' ); }