Changeset 659945
- Timestamp:
- 01/28/2013 12:20:03 AM (13 years ago)
- Location:
- watermark-reloaded/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (2 diffs)
-
watermark-loader.php (modified) (1 diff)
-
watermark-reloaded.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
watermark-reloaded/trunk/readme.txt
r581977 r659945 4 4 Tags: watermark, images, pictures, text watermark, image watermark, watermark reloaded, upload, Post, admin 5 5 Requires at least: 3.0 6 Tested up to: 3. 4.17 Stable tag: 1.3. 16 Tested up to: 3.5.1 7 Stable tag: 1.3.2 8 8 9 9 Add watermark to your uploaded images and customize your watermark appearance on a user friendly settings page. … … 123 123 * Plugin options page credentials update 124 124 * Added dashboard with current watermark settings and preview display 125 126 = 1.3.2 = 127 * Added file type check, because we need to process only image files -
watermark-reloaded/trunk/watermark-loader.php
r571715 r659945 4 4 Plugin URI: http://eappz.eu/en/products/watermark-reloaded/ 5 5 Description: Add watermark to your uploaded images and customize your watermark appearance in user friendly settings page. 6 Version: 1.3. 16 Version: 1.3.2 7 7 Author: Sandi Verdev 8 8 Author URI: http://eAppz.eu/ -
watermark-reloaded/trunk/watermark-reloaded.php
r571715 r659945 15 15 */ 16 16 protected $_options = array( 17 'watermark_installed' => 0, 17 18 'watermark_donated' => 0, 18 19 'watermark_hide_nag' => 0, … … 157 158 */ 158 159 public function applyWatermark($data) { 159 // get settings for watermarking 160 $upload_dir = wp_upload_dir(); 161 $watermark_on = $this->get_option('watermark_on'); 162 163 // loop through image sizes ... 164 foreach($watermark_on as $image_size => $on) { 165 if($on == true) { 166 switch($image_size) { 167 case 'fullsize': 168 $filepath = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $data['file']; 169 break; 170 default: 171 if(!empty($data['sizes']) && array_key_exists($image_size, $data['sizes'])) { 172 $filepath = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . dirname($data['file']) . DIRECTORY_SEPARATOR . $data['sizes'][$image_size]['file']; 173 } else { 174 // early getaway 175 continue 2; 176 } 160 // check if input data is provided, thus it is image and needs to be watermarked 161 if(!empty($data)) { 162 // get settings for watermarking 163 $upload_dir = wp_upload_dir(); 164 $watermark_on = $this->get_option('watermark_on'); 165 166 // loop through image sizes ... 167 foreach($watermark_on as $image_size => $on) { 168 if($on == true) { 169 switch($image_size) { 170 case 'fullsize': 171 $filepath = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $data['file']; 172 break; 173 default: 174 if(!empty($data['sizes']) && array_key_exists($image_size, $data['sizes'])) { 175 $filepath = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . dirname($data['file']) . DIRECTORY_SEPARATOR . $data['sizes'][$image_size]['file']; 176 } else { 177 // early getaway 178 continue 2; 179 } 180 } 181 182 // ... and apply watermark 183 $this->doWatermark($filepath); 177 184 } 178 179 // ... and apply watermark180 $this->doWatermark($filepath);181 185 } 182 186 } … … 435 439 public function __construct() { 436 440 $this->_plugin_dir = DIRECTORY_SEPARATOR . str_replace(basename(__FILE__), null, plugin_basename(__FILE__)); 437 $this->_settings_url = 'options-general.php?page=' . plugin_basename(__FILE__); ;441 $this->_settings_url = 'options-general.php?page=' . plugin_basename(__FILE__); 438 442 439 443 $allowed_options = array(
Note: See TracChangeset
for help on using the changeset viewer.