From ac6a59914b0c1a20f084f9ae9a3136b28c89493e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 7 Mar 2021 13:22:38 +0300 Subject: nsfw: support API clients --- classes/feeds.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'classes/feeds.php') diff --git a/classes/feeds.php b/classes/feeds.php index 5eb5c26d0..68d535481 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -251,21 +251,6 @@ class Feeds extends Handler_Protected { $this->_mark_timestamp(" sanitize"); - PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_CDM, - function ($result, $plugin) use (&$line) { - $line = $result; - $this->_mark_timestamp(" hook_render_cdm: " . get_class($plugin)); - }, - $line); - - $this->_mark_timestamp(" hook_render_cdm"); - - $line['content'] = DiskCache::rewrite_urls($line['content']); - - $this->_mark_timestamp(" disk_cache_rewrite"); - - $this->_mark_timestamp(" note"); - if (!get_pref(Prefs::CDM_EXPANDED)) { $line["cdm_excerpt"] = " _mark_timestamp(" color"); + $this->_mark_timestamp(" pre-hook_render_cdm"); + + PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_CDM, + function ($result, $plugin) use (&$line) { + $line = $result; + $this->_mark_timestamp(" hook: " . get_class($plugin)); + }, + $line); + + $this->_mark_timestamp(" hook_render_cdm"); + + $line['content'] = DiskCache::rewrite_urls($line['content']); + + $this->_mark_timestamp(" disk_cache_rewrite"); /* we don't need those */ -- cgit v1.2.3