aboutsummaryrefslogtreecommitdiff
path: root/lib/watermark.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/watermark.php')
-rw-r--r--lib/watermark.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/watermark.php b/lib/watermark.php
index 896be72fa..c7b8503c5 100644
--- a/lib/watermark.php
+++ b/lib/watermark.php
@@ -27,6 +27,10 @@ function tp_gd_watermark($image) {
if (!$watermark_text)
return;
+ // plugins can do their own watermark and return false to prevent this function from running
+ if (trigger_plugin_hook('tp_watermark', 'gd', $image, true) === false)
+ return;
+
global $CONFIG;
$owner = get_loggedin_user();
@@ -60,6 +64,10 @@ function tp_imagick_watermark($filename) {
if (!$watermark_text)
return;
+ // plugins can do their own watermark and return false to prevent this function from running
+ if (trigger_plugin_hook('tp_watermark', 'imagick', $filename, true) === false)
+ return;
+
$owner = get_loggedin_user();
$watermark_text = tp_process_watermark_text($watermark_text, $owner);
@@ -96,7 +104,10 @@ function tp_im_cmdline_watermark($filename) {
if (!$watermark_text)
return;
-
+ // plugins can do their own watermark and return false to prevent this function from running
+ if (trigger_plugin_hook('tp_watermark', 'imagemagick', $filename, true) === false)
+ return;
+
$im_path = get_plugin_setting('im_path', 'tidypics');
if (!$im_path) {
$im_path = "/usr/bin/";