private function removeImage($keyImg)
    {
        // Save the path in one temporal var
        $getImagePath = $this->getImagePath($keyImg);
        $sizes = $this->getImageSizesToDelete();
        foreach ($sizes as $size) {
            $imgPath = $getImagePath['virgen'] . "-{$size}x{$size}" . $getImagePath['ext'];
            if (file_exists($imgPath)) {
                unlink($imgPath);
            }
        }

        if (file_exists($getImagePath['base'])) {
            unlink($getImagePath['base']);
        }

        if (file_exists($getImagePath['current'])) {
            unlink($getImagePath['current']);
        }

        // remove his meta info
        return delete_user_meta($this->ID, $keyImg);
    }
private function removeImage($keyImg)
    {
        // Save the path in one temporal var
        $getImagePath = $this->getImagePath($keyImg);
        $sizes = $this->getImageSizesToDelete();
        foreach ($sizes as $size) {
            $imgPath = $getImagePath['virgen'] . "-{$size}x{$size}" . $getImagePath['ext'];
            if (file_exists($imgPath)) {
                unlink($imgPath);
            }
        }

        if (file_exists($getImagePath['base'])) {
            unlink($getImagePath['base']);
        }

        if (file_exists($getImagePath['current'])) {
            unlink($getImagePath['current']);
        }

        // remove his meta info
        return delete_user_meta($this->ID, $keyImg);
    }
private function removeImage ( $ keyImg ) { // Save the path in one temporal var $ getImagePath = $ this -> getImagePath ( $ keyImg ) ; $ sizes = $ this -> getImageSizesToDelete ( ) ; foreach ( $ sizes as $ size ) { $ imgPath = $ getImagePath [ 'virgen' ] . "-{$size}x{$size}" . $ getImagePath [ 'ext' ] ; if ( file_exists ( $ imgPath ) ) { unlink ( $ imgPath ) ; } } if ( file_exists ( $ getImagePath [ 'base' ] ) ) { unlink ( $ getImagePath [ 'base' ] ) ; } if ( file_exists ( $ getImagePath [ 'current' ] ) ) { unlink ( $ getImagePath [ 'current' ] ) ; } // remove his meta info return delete_user_meta ( $ this -> ID , $ keyImg ) ; }
Remove the image

@param unknown $keyImg
Remove the image