diff options
author | Andrew Dolgov <[email protected]> | 2021-03-07 13:22:38 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-07 13:22:38 +0300 |
commit | ac6a59914b0c1a20f084f9ae9a3136b28c89493e (patch) | |
tree | 122b1489c91496bb2768a8b84c96af6e8d0321c6 /classes/feeds.php | |
parent | ffb93d72acb60d1418cc00f2bc676a623f7e5e1c (diff) |
nsfw: support API clients
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-x | classes/feeds.php | 29 |
1 files changed, 14 insertions, 15 deletions
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"] = "<span class='collapse'> <i class='material-icons' onclick='return Article.cdmUnsetActive(event)' @@ -330,6 +315,20 @@ class Feeds extends Handler_Protected { } $this->_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 */ |