Version Description
- Fix: Option to disable right click on images not working
Download this release
Release Info
Developer | dfactory |
Plugin | Image Watermark |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
- image-watermark.php +6 -5
- js/no-right-click-front.js +13 -5
- readme.txt +6 -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.3.
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/image-watermark/
|
@@ -69,7 +69,7 @@ class Image_Watermark
|
|
69 |
'draganddrop' => 0,
|
70 |
'forlogged' => 0,
|
71 |
),
|
72 |
-
'version' => '1.3.
|
73 |
);
|
74 |
|
75 |
|
@@ -385,9 +385,10 @@ class Image_Watermark
|
|
385 |
{
|
386 |
$options = get_option('df_image_protection');
|
387 |
|
388 |
-
|
389 |
-
$options['
|
390 |
-
$options['
|
|
|
391 |
|
392 |
if(($options['forlogged'] == 0 && is_user_logged_in()) || ($options['draganddrop'] == 0 && $options['rightclick'] == 0))
|
393 |
return;
|
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.3.1
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/image-watermark/
|
69 |
'draganddrop' => 0,
|
70 |
'forlogged' => 0,
|
71 |
),
|
72 |
+
'version' => '1.3.1'
|
73 |
);
|
74 |
|
75 |
|
385 |
{
|
386 |
$options = get_option('df_image_protection');
|
387 |
|
388 |
+
// backward compatibility options
|
389 |
+
$options['forlogged'] = (!empty($options['forlogged']) ? 1 : 0);
|
390 |
+
$options['draganddrop'] = (!empty($options['draganddrop']) ? 1 : 0);
|
391 |
+
$options['rightclick'] = (!empty($options['rightclick']) ? 1 : 0);
|
392 |
|
393 |
if(($options['forlogged'] == 0 && is_user_logged_in()) || ($options['draganddrop'] == 0 && $options['rightclick'] == 0))
|
394 |
return;
|
js/no-right-click-front.js
CHANGED
@@ -9,6 +9,9 @@ var df_nrc_targSrc=null;
|
|
9 |
var df_nrc_inContext=false;
|
10 |
var df_nrc_notimage=new Image();
|
11 |
var df_nrc_limit=0;
|
|
|
|
|
|
|
12 |
function df_nrc_dragdropAll(event) {
|
13 |
try {
|
14 |
var ev=event||window.event;
|
@@ -38,6 +41,7 @@ function df_nrc_dragdropAll(event) {
|
|
38 |
}
|
39 |
return true;
|
40 |
}
|
|
|
41 |
function df_nrc_dragdrop(event) {
|
42 |
// I am beginning to doubt if this event ever fires
|
43 |
try {
|
@@ -55,6 +59,7 @@ function df_nrc_dragdrop(event) {
|
|
55 |
}
|
56 |
return true;
|
57 |
}
|
|
|
58 |
function df_nrc_context(event) {
|
59 |
try {
|
60 |
df_nrc_inContext=true;
|
@@ -72,6 +77,7 @@ function df_nrc_context(event) {
|
|
72 |
}
|
73 |
return false;
|
74 |
}
|
|
|
75 |
function df_nrc_contextAll(event) {
|
76 |
try {
|
77 |
if (df_nrc_targImg==null) {
|
@@ -95,6 +101,7 @@ function df_nrc_contextAll(event) {
|
|
95 |
}
|
96 |
return false;
|
97 |
}
|
|
|
98 |
function kpg_nrc1_mousedown(event) {
|
99 |
try {
|
100 |
df_nrc_inContext=false;
|
@@ -116,6 +123,7 @@ function kpg_nrc1_mousedown(event) {
|
|
116 |
}
|
117 |
return true;
|
118 |
}
|
|
|
119 |
function kpg_nrc1_mousedownAll(event) {
|
120 |
try {
|
121 |
df_nrc_inContext=false;
|
@@ -142,6 +150,7 @@ function kpg_nrc1_mousedownAll(event) {
|
|
142 |
}
|
143 |
return true;
|
144 |
}
|
|
|
145 |
function df_nrc_replace(targ) {
|
146 |
return false;
|
147 |
if (df_nrc_targImg!=null && df_nrc_targImg.src==df_nrc_notimage.src) {
|
@@ -164,6 +173,7 @@ return false;
|
|
164 |
var t=setTimeout("df_nrc_restore()",500);
|
165 |
return false;
|
166 |
}
|
|
|
167 |
function df_nrc_restore() {
|
168 |
if (df_nrc_inContext) {
|
169 |
if (df_nrc_limit<=20) {
|
@@ -180,6 +190,7 @@ function df_nrc_restore() {
|
|
180 |
df_nrc_targSrc=null;
|
181 |
return;
|
182 |
}
|
|
|
183 |
// sets the image onclick event
|
184 |
// need to check for dblclick to see if there is a right double click in IE
|
185 |
function df_nrc_action(event) {
|
@@ -199,6 +210,7 @@ function df_nrc_action(event) {
|
|
199 |
return false;
|
200 |
}
|
201 |
}
|
|
|
202 |
if (document.addEventListener) {
|
203 |
document.addEventListener("DOMContentLoaded", function(event) { df_nrc_action(event); }, false);
|
204 |
} else if (window.attachEvent) {
|
@@ -211,8 +223,4 @@ if (document.addEventListener) {
|
|
211 |
}
|
212 |
df_nrc_action('load');
|
213 |
};
|
214 |
-
}
|
215 |
-
|
216 |
-
|
217 |
-
var df_nrc_extra = norightclick_args.rightclick;
|
218 |
-
var df_nrc_drag = norightclick_args.draganddrop;
|
9 |
var df_nrc_inContext=false;
|
10 |
var df_nrc_notimage=new Image();
|
11 |
var df_nrc_limit=0;
|
12 |
+
var df_nrc_extra = norightclick_args.rightclick;
|
13 |
+
var df_nrc_drag = norightclick_args.draganddrop;
|
14 |
+
|
15 |
function df_nrc_dragdropAll(event) {
|
16 |
try {
|
17 |
var ev=event||window.event;
|
41 |
}
|
42 |
return true;
|
43 |
}
|
44 |
+
|
45 |
function df_nrc_dragdrop(event) {
|
46 |
// I am beginning to doubt if this event ever fires
|
47 |
try {
|
59 |
}
|
60 |
return true;
|
61 |
}
|
62 |
+
|
63 |
function df_nrc_context(event) {
|
64 |
try {
|
65 |
df_nrc_inContext=true;
|
77 |
}
|
78 |
return false;
|
79 |
}
|
80 |
+
|
81 |
function df_nrc_contextAll(event) {
|
82 |
try {
|
83 |
if (df_nrc_targImg==null) {
|
101 |
}
|
102 |
return false;
|
103 |
}
|
104 |
+
|
105 |
function kpg_nrc1_mousedown(event) {
|
106 |
try {
|
107 |
df_nrc_inContext=false;
|
123 |
}
|
124 |
return true;
|
125 |
}
|
126 |
+
|
127 |
function kpg_nrc1_mousedownAll(event) {
|
128 |
try {
|
129 |
df_nrc_inContext=false;
|
150 |
}
|
151 |
return true;
|
152 |
}
|
153 |
+
|
154 |
function df_nrc_replace(targ) {
|
155 |
return false;
|
156 |
if (df_nrc_targImg!=null && df_nrc_targImg.src==df_nrc_notimage.src) {
|
173 |
var t=setTimeout("df_nrc_restore()",500);
|
174 |
return false;
|
175 |
}
|
176 |
+
|
177 |
function df_nrc_restore() {
|
178 |
if (df_nrc_inContext) {
|
179 |
if (df_nrc_limit<=20) {
|
190 |
df_nrc_targSrc=null;
|
191 |
return;
|
192 |
}
|
193 |
+
|
194 |
// sets the image onclick event
|
195 |
// need to check for dblclick to see if there is a right double click in IE
|
196 |
function df_nrc_action(event) {
|
210 |
return false;
|
211 |
}
|
212 |
}
|
213 |
+
|
214 |
if (document.addEventListener) {
|
215 |
document.addEventListener("DOMContentLoaded", function(event) { df_nrc_action(event); }, false);
|
216 |
} else if (window.attachEvent) {
|
223 |
}
|
224 |
df_nrc_action('load');
|
225 |
};
|
226 |
+
}
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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: 3.8.1
|
7 |
-
Stable tag: 1.3.
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
@@ -59,6 +59,9 @@ No questions yet.
|
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
62 |
= 1.3.0 =
|
63 |
* Tweak: Manual watermarking now works even if selected post types are selected
|
64 |
* Tweak: UI improvements for WP 3.8
|
@@ -121,7 +124,5 @@ Initial release
|
|
121 |
|
122 |
== Upgrade Notice ==
|
123 |
|
124 |
-
= 1.3.
|
125 |
-
*
|
126 |
-
* Tweak: UI improvements for WP 3.8
|
127 |
-
* Fix: Image protection options not saving properly
|
4 |
Tags: image, images, picture, photo, watermark, watermarking, protection, image protection, image security, plugin
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 1.3.1
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
59 |
|
60 |
== Changelog ==
|
61 |
|
62 |
+
= 1.3.1 =
|
63 |
+
* Fix: Option to disable right click on images not working
|
64 |
+
|
65 |
= 1.3.0 =
|
66 |
* Tweak: Manual watermarking now works even if selected post types are selected
|
67 |
* Tweak: UI improvements for WP 3.8
|
124 |
|
125 |
== Upgrade Notice ==
|
126 |
|
127 |
+
= 1.3.1 =
|
128 |
+
* Fix: Option to disable right click on images not working
|
|
|
|