Image Watermark - Version 1.5.2

Version Description

  • Tweak: Switch from wp_get_referer() to DOING_AJAX and is_admin().
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Image Watermark
Version 1.5.2
Comparing to
See all releases

Code changes from version 1.5.1 to 1.5.2

Files changed (2) hide show
  1. image-watermark.php +6 -6
  2. readme.txt +7 -5
image-watermark.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Image Watermark
4
  Description: Image Watermark allows you to automatically watermark images uploaded to the WordPress Media Library and bulk watermark previously uploaded images.
5
- Version: 1.5.1
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/image-watermark/
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) )
29
  * Image Watermark class.
30
  *
31
  * @class Image_Watermark
32
- * @version 1.5.1
33
  */
34
  class Image_Watermark {
35
 
@@ -72,7 +72,7 @@ class Image_Watermark {
72
  'forlogged' => 0,
73
  ),
74
  ),
75
- 'version' => '1.5.1'
76
  );
77
  public $options = array();
78
 
@@ -282,8 +282,8 @@ class Image_Watermark {
282
  */
283
  public function handle_upload_files( $file ) {
284
 
285
- // admin, we cant use is_admin() here due to frontend's admin-ajax.php request
286
- if ( strpos( strtolower( wp_get_referer() ), strtolower( admin_url() ), 0 ) === 0 ) {
287
 
288
  $this->is_admin = true;
289
 
@@ -451,7 +451,7 @@ class Image_Watermark {
451
  __( 'Check out our other', 'image-watermark' ) . ' <a href="http://www.dfactory.eu/plugins/?utm_source=image-watermark-settings&utm_medium=link&utm_campaign=other-plugins" target="_blank" title="' . __( 'WordPress plugins', 'image-watermark' ) . '">' . __( 'WordPress plugins', 'image-watermark' ) . '</a>
452
  </p>
453
  <hr />
454
- <p class="df-link inner">' . __( 'Created by', 'image-watermark' ) . ' <a href="http://www.dfactory.eu/?utm_source=image-watermark-settings&utm_medium=link&utm_campaign=created-by" target="_blank" title="dFactory - Quality plugins for WordPress"><img src="' . EVENTS_MAKER_URL . '/images/logo-dfactory.png' . '" title="dFactory - Quality plugins for WordPress" alt="dFactory - Quality plugins for WordPress" /></a></p>
455
  </div>
456
  </div>
457
  <form action="options.php" method="post">';
2
  /*
3
  Plugin Name: Image Watermark
4
  Description: Image Watermark allows you to automatically watermark images uploaded to the WordPress Media Library and bulk watermark previously uploaded images.
5
+ Version: 1.5.2
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/image-watermark/
29
  * Image Watermark class.
30
  *
31
  * @class Image_Watermark
32
+ * @version 1.5.2
33
  */
34
  class Image_Watermark {
35
 
72
  'forlogged' => 0,
73
  ),
74
  ),
75
+ 'version' => '1.5.2'
76
  );
77
  public $options = array();
78
 
282
  */
283
  public function handle_upload_files( $file ) {
284
 
285
+ // admin
286
+ if ( is_admin() && ! ( defined( 'DOING_AJAX' && DOING_AJAX ) ) ) {
287
 
288
  $this->is_admin = true;
289
 
451
  __( 'Check out our other', 'image-watermark' ) . ' <a href="http://www.dfactory.eu/plugins/?utm_source=image-watermark-settings&utm_medium=link&utm_campaign=other-plugins" target="_blank" title="' . __( 'WordPress plugins', 'image-watermark' ) . '">' . __( 'WordPress plugins', 'image-watermark' ) . '</a>
452
  </p>
453
  <hr />
454
+ <p class="df-link inner">' . __( 'Created by', 'image-watermark' ) . ' <a href="http://www.dfactory.eu/?utm_source=image-watermark-settings&utm_medium=link&utm_campaign=created-by" target="_blank" title="dFactory - Quality plugins for WordPress"><img src="' . plugins_url( '/images/logo-dfactory.png', __FILE__ ) . '/images/logo-dfactory.png' . '" title="dFactory - Quality plugins for WordPress" alt="dFactory - Quality plugins for WordPress" /></a></p>
455
  </div>
456
  </div>
457
  <form action="options.php" method="post">';
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dfactory
3
  Donate link: http://www.dfactory.eu/
4
  Tags: image, images, picture, photo, watermark, watermarking, protection, image protection, image security, plugin
5
  Requires at least: 3.5
6
- Tested up to: 4.2.2
7
- Stable tag: 1.5.1
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -61,6 +61,9 @@ No questions yet.
61
 
62
  == Changelog ==
63
 
 
 
 
64
  = 1.5.1 =
65
  * New: Introducing [plugin documentation](https://www.dfactory.eu/docs/image-watermark-plugin/)
66
  * Tweak: Improved transparent watermark support
@@ -147,6 +150,5 @@ Initial release
147
 
148
  == Upgrade Notice ==
149
 
150
- = 1.5.1 =
151
- * New: Introducing [plugin documentation](https://www.dfactory.eu/docs/image-watermark-plugin/)
152
- * Tweak: Improved transparent watermark support
3
  Donate link: http://www.dfactory.eu/
4
  Tags: image, images, picture, photo, watermark, watermarking, protection, image protection, image security, plugin
5
  Requires at least: 3.5
6
+ Tested up to: 4.4.1
7
+ Stable tag: 1.5.2
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
61
 
62
  == Changelog ==
63
 
64
+ = 1.5.2 =
65
+ * Tweak: Switch from wp_get_referer() to DOING_AJAX and is_admin().
66
+
67
  = 1.5.1 =
68
  * New: Introducing [plugin documentation](https://www.dfactory.eu/docs/image-watermark-plugin/)
69
  * Tweak: Improved transparent watermark support
150
 
151
  == Upgrade Notice ==
152
 
153
+ = 1.5.2 =
154
+ * Tweak: Switch from wp_get_referer() to DOING_AJAX and is_admin().