From bdf9f7fe79f5c8077d20dbb1029903ed90e77d36 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 3 Oct 2009 18:42:21 +0000 Subject: added watermark plugin hooks --- lib/watermark.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/watermark.php') 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/"; -- cgit v1.2.3