summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-08-15 16:15:15 +0300
committerAndrew Dolgov <[email protected]>2019-08-15 16:15:15 +0300
commit12e771bc0895e762dbb7e10920618de09c0e2fca (patch)
tree8cc51220bf1091f1654b39b17142ab5e6f46ec86
parent3367bfc862095fc64e3d7f7d1b800f258d0e449d (diff)
set lower hook priority via pluginhost, rename main class (removes zz-hack)
-rw-r--r--init.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/init.php b/init.php
index e0ba17a..e04e88d 100644
--- a/init.php
+++ b/init.php
@@ -1,5 +1,5 @@
<?php
-class Af_Zz_Api_Resize extends Plugin {
+class Af_Api_Resize extends Plugin {
const MAX_WIDTH = 1024;
@@ -23,8 +23,8 @@ class Af_Zz_Api_Resize extends Plugin {
$this->host = $host;
$this->cache = new DiskCache("images");
- $host->add_hook($host::HOOK_RENDER_ARTICLE_API, $this);
- $host->add_hook($host::HOOK_ARTICLE_IMAGE, $this);
+ $host->add_hook($host::HOOK_RENDER_ARTICLE_API, $this, 999);
+ $host->add_hook($host::HOOK_ARTICLE_IMAGE, $this, 999);
}
private function make_thumbnail($input_filename, $output_filename, $dim_max_x = 600, $dim_max_y = 600, $content_type = "", $force_stamp = false) {