Changeset 1854365
- Timestamp:
- 04/06/2018 09:38:27 PM (8 years ago)
- Location:
- wp-s3/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
s3.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-s3/trunk/readme.txt
r1854236 r1854365 1 1 === Wordpress Amazon S3 Plugin === 2 Tags: Media, Amazon, S3, CDN, Admin, Uploads, Mirror 2 Tags: Media, Amazon, S3, CDN, Admin, Uploads, Mirror, Bandwidth, Content Delivery Network, Performance 3 3 Contributors: imthiaz 4 4 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMMYTX4JXJHF8 5 5 Requires at least: 2.3 6 6 Tested up to: 4.9.5 7 Stable tag: 1.4 7 Stable tag: 1.5 8 Requires PHP: 5.6 8 9 License: LGPL 9 10 License URI: http://www.gnu.org/licenses/lgpl.html 10 11 11 12 12 == Description == … … 15 15 == Installation == 16 16 1. Copy plugin files to Wordpress wp-content/plugins folder 17 2. Make sure you create a folder named 's3temp' in your media upload folder and make it writable. 17 2. Make sure you create a folder named 's3temp' in your media upload folder and make it writable. 18 18 3. Activate the plugin 19 19 4. Go to Amazon s3 page under plugins and set up your Amazon S3 credentials … … 74 74 == Changelog == 75 75 76 = Version: 1.5 Dated: 2018-04-06 = 77 * Fixed bug which clears all setting during update 78 * Now it also adds the images which are one folder outside css file 79 76 80 = Version: 1.4 Dated: 2018-04-06 = 77 81 * Changed the S3 library to Amazon SDK -
wp-s3/trunk/s3.php
r1854236 r1854365 5 5 Description: WP-S3 copies media files used in your blog post to Amazon S3 cloud. Uses only filters to replace the media urls in the post if media is available in the S3 cloud. Wordpress cron functionality is used for batching media upload to S3. This plugin is very safe and will not modify anything in your database. 6 6 Author: Imthiaz Rafiq 7 Version: 1. 47 Version: 1.5 8 8 Author URI: https://www.imthi.com/ 9 9 */ 10 11 //function dump($var) 12 //{ 13 // print '<pre>'; 14 // print_r($var); 15 // print '</pre>'; 16 //} 10 17 11 18 class S3Plugin … … 211 218 function deactivatePlugin() 212 219 { 213 $query = "DROP TABLE IF EXISTS `{$this->tableImageQueue}`;"; 214 $this->db->query($query); 215 216 $this->recursive_remove_directory($this->s3CacheFolder, true); 217 218 219 delete_option('s3plugin_amazon_key_id'); 220 delete_option('s3plugin_amazon_secret_key'); 221 delete_option('s3plugin_amazon_bucket_name'); 222 delete_option('s3plugin_compress_files'); 223 delete_option('s3plugin_dir_prefix'); 224 delete_option('s3plugin_use_cloudfrontURL'); 225 delete_option('s3plugin_cloudfrontURL'); 226 delete_option('s3plugin_cron_interval'); 227 delete_option('s3plugin_cron_limit'); 220 /* 221 $query = "DROP TABLE IF EXISTS `{$this->tableImageQueue}`;"; 222 $this->db->query($query); 223 224 $this->recursive_remove_directory($this->s3CacheFolder, true); 225 226 delete_option('s3plugin_amazon_key_id'); 227 delete_option('s3plugin_amazon_secret_key'); 228 delete_option('s3plugin_amazon_bucket_name'); 229 delete_option('s3plugin_compress_files'); 230 delete_option('s3plugin_dir_prefix'); 231 delete_option('s3plugin_use_cloudfrontURL'); 232 delete_option('s3plugin_cloudfrontURL'); 233 delete_option('s3plugin_cron_interval'); 234 delete_option('s3plugin_cron_limit'); 235 */ 228 236 } 229 237 … … 430 438 $cssFolder = dirname($realPath); 431 439 $cssRelatedFiles = $this->scanDirectoryRecursively($cssFolder); 440 441 $cssSearchImageFolder = realpath($cssFolder . DIRECTORY_SEPARATOR . '../images'); 442 if (is_dir($cssSearchImageFolder)) { 443 $newFiles = $this->scanDirectoryRecursively($cssSearchImageFolder); 444 if (!empty($newFiles)) { 445 $cssRelatedFiles = $cssRelatedFiles + $newFiles; 446 } 447 } 432 448 if (!empty($cssRelatedFiles)) { 433 449 foreach ($cssRelatedFiles as $relatedFile) { … … 446 462 $directory = substr($directory, 0, -1); 447 463 } 464 448 465 449 466 $extensionToInclude = array('css', 'png', 'gif', 'jpg', 'jpeg', 'svg', 'eot', 'ttf', 'woff', 'woff2', 'js', 'otf');
Note: See TracChangeset
for help on using the changeset viewer.