private function create_zip( $files = array(), $destination = '', $overwrite = true ) {
		//if the zip file already exists and overwrite is false, return false
		if ( file_exists( $destination ) && ! $overwrite ) {
			return false;
		}

		//create the archive
		$zip = new \ZipArchive();
		if ( $zip->open( $destination, \ZIPARCHIVE::OVERWRITE | \ZIPARCHIVE::CREATE ) !== true ) {
			return false;
		}
		//add the files
		foreach ( $files as $file ) {
			$zip->addFile( $file, basename( $file ) );
		}

		//close the zip -- done!
		$zip->close();

		//check to make sure the file exists
		if ( file_exists( $destination ) ) {
			printf( basename( $destination ) . ' created.' . "\n<br>" );
		} else {
			printf( '<span style="color:#f00">' . basename( $destination ) . ' failed.</span>' . "\n<br>" );
		}
	}
private function create_zip( $files = array(), $destination = '', $overwrite = true ) {
		//if the zip file already exists and overwrite is false, return false
		if ( file_exists( $destination ) && ! $overwrite ) {
			return false;
		}

		//create the archive
		$zip = new \ZipArchive();
		if ( $zip->open( $destination, \ZIPARCHIVE::OVERWRITE | \ZIPARCHIVE::CREATE ) !== true ) {
			return false;
		}
		//add the files
		foreach ( $files as $file ) {
			$zip->addFile( $file, basename( $file ) );
		}

		//close the zip -- done!
		$zip->close();

		//check to make sure the file exists
		if ( file_exists( $destination ) ) {
			printf( basename( $destination ) . ' created.' . "\n<br>" );
		} else {
			printf( '<span style="color:#f00">' . basename( $destination ) . ' failed.</span>' . "\n<br>" );
		}
	}
private function create_zip ( $ files = array ( ) , $ destination = '' , $ overwrite = true ) { //if the zip file already exists and overwrite is false, return false if ( file_exists ( $ destination ) && ! $ overwrite ) { return false ; } //create the archive $ zip = new \ ZipArchive ( ) ; if ( $ zip -> open ( $ destination , \ ZIPARCHIVE :: OVERWRITE | \ ZIPARCHIVE :: CREATE ) !== true ) { return false ; } //add the files foreach ( $ files as $ file ) { $ zip -> addFile ( $ file , basename ( $ file ) ) ; } //close the zip -- done! $ zip -> close ( ) ; //check to make sure the file exists if ( file_exists ( $ destination ) ) { printf ( basename ( $ destination ) . ' created.' . "\n<br>" ) ; } else { printf ( '<span style="color:#f00">' . basename ( $ destination ) . ' failed.</span>' . "\n<br>" ) ; } }
Create individual zipfile.

@link https://davidwalsh.name/create-zip-php

@param array  $files       Array of .mo/.po files for each translation.
@param string $destination Filepath to zipfile.
@param bool   $overwrite   Boolean to set zipfile creation overwrite mode.

@return bool
Create individual zipfile .