diff options
author | Andrew Dolgov <[email protected]> | 2014-05-14 12:09:01 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-05-14 12:09:01 +0400 |
commit | a283bf26438199e415fcebb2ee0b8b72b0db51cf (patch) | |
tree | 5ff0ec03291429c99948d3a6d98ec73b3d8afda4 /include/functions2.php | |
parent | 1fd733c8ff026f0d5095a2c5a1ebe4d4095da3cd (diff) | |
parent | c6ce584dd56320da336ecbf69d424f0bc05f4f5a (diff) |
Merge pull request #374 from dzaikos/plugin-hook-enclosures
Plugin hook enclosures
Diffstat (limited to 'include/functions2.php')
-rw-r--r-- | include/functions2.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/functions2.php b/include/functions2.php index 959e7154d..5228d875c 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -1846,8 +1846,17 @@ $result = get_article_enclosures($id); $rv = ''; - if (count($result) > 0) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_FORMAT_ENCLOSURES) as $plugin) { + $retval = $plugin->hook_format_enclosures($rv, $result, $id, $always_display_enclosures, $article_content, $hide_images); + if (is_array($retval)) { + $rv = $retval[0]; + $result = $retval[1]; + } else { + $rv = $retval; + } + } + if ($rv === '' && !empty($result)) { $entries_html = array(); $entries = array(); $entries_inline = array(); |