| @@ -5,9 +5,9 @@ | ||
| 5 | 5 | Author: Jose Mortellaro |
| 6 | 6 | Author URI: https://josemortellaro.com |
| 7 | 7 | Domain Path: /languages/ |
| 8 | 8 | Text Domain: plugversions |
| 9 | -Version: 0.0.6 | |
| 9 | +Version: 0.0.4 | |
| 10 | 10 | */ |
| 11 | 11 | /* This program is free software; you can redistribute it and/or modify |
| 12 | 12 | it under the terms of the GNU General Public License as published by |
| 13 | 13 | the Free Software Foundation; either version 2 of the License, or |
| @@ -63,49 +63,5 @@ | ||
| 63 | 63 | update_site_option( 'plugin_revisions',$opts ); |
| 64 | 64 | return substr( md5( $time ),0,8 ); |
| 65 | 65 | } |
| 66 | 66 | return false; |
| 67 | -} | |
| 68 | - | |
| 69 | -/** | |
| 70 | - * Create zip pclzip. | |
| 71 | - * | |
| 72 | - * @since 0.0.6 | |
| 73 | - * | |
| 74 | - */ | |
| 75 | -function eos_pv_create_zip_pclzip( $destination, $zip_dirname ) { | |
| 76 | - if( file_exists( ABSPATH . 'wp-admin/includes/class-pclzip.php' ) ) { | |
| 77 | - require_once( ABSPATH . 'wp-admin/includes/class-pclzip.php' ); | |
| 78 | - if( class_exists( 'PclZip' ) ) { | |
| 79 | - $files = eos_pv_get_files( $destination ); | |
| 80 | - if( $files ) { | |
| 81 | - $zip = new PclZip( str_replace( '/.zip', '.zip', $destination . '.zip' ) ); | |
| 82 | - if ( defined( 'PCLZIP_OPT_REMOVE_PATH' ) ) { | |
| 83 | - $zip_created = $zip->create( $files, PCLZIP_OPT_REMOVE_PATH, WP_PLUGIN_DIR ); | |
| 84 | - if( 0 == $zip_created ) { | |
| 85 | - return false; | |
| 86 | - } | |
| 87 | - return true; | |
| 88 | - } | |
| 89 | - } | |
| 90 | - } | |
| 91 | - return false; | |
| 92 | - } | |
| 93 | -} | |
| 94 | - | |
| 95 | -/** | |
| 96 | - * Get files by path. | |
| 97 | - * | |
| 98 | - * @since 0.0.6 | |
| 99 | - */ | |
| 100 | -function eos_pv_get_files( $path ) { | |
| 101 | - if( ! class_exists( 'RecursiveIteratorIterator' ) ) return false; | |
| 102 | - $files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $path ), RecursiveIteratorIterator::LEAVES_ONLY ); | |
| 103 | - $files_paths = array(); | |
| 104 | - foreach ( $files as $name => $file ) { | |
| 105 | - if ( ! $file->isDir() ) { | |
| 106 | - $file_path = str_replace( '\\', '/', $file->getRealPath() ); | |
| 107 | - $files_paths[] = $file_path; | |
| 108 | - } | |
| 109 | - } | |
| 110 | - return $files_paths; | |
| 111 | 67 | } |