diff options
author | Andrew Dolgov <[email protected]> | 2019-04-17 08:32:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-04-17 08:32:35 +0300 |
commit | 6955b2e02d4893fd88009a8162d45b6c8b3514c6 (patch) | |
tree | 3320ab3de6089137b22125c3e3bda5cff2740129 /classes/article.php | |
parent | 525298569ec9041e672dee60e20565b2e0dc0923 (diff) |
plugins: add HOOK_GET_FULL_TEXT which may be used to provide full text extraction to core code and other plugins, instead of trying to invoke af_readability specifically
Diffstat (limited to 'classes/article.php')
-rwxr-xr-x | classes/article.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/classes/article.php b/classes/article.php index 974f9114f..983fcd193 100755 --- a/classes/article.php +++ b/classes/article.php @@ -100,7 +100,7 @@ class Article extends Handler_Protected { $pluginhost->load_all(PluginHost::KIND_ALL, $owner_uid); $pluginhost->load_data(); - $af_readability = $pluginhost->get_plugin("Af_Readability"); + /*$af_readability = $pluginhost->get_plugin("Af_Readability"); if ($af_readability) { $enable_share_anything = $pluginhost->get($af_readability, "enable_share_anything"); @@ -110,6 +110,15 @@ class Article extends Handler_Protected { if ($extracted_content) $content = $extracted_content; } + }*/ + + foreach ($pluginhost->get_hooks(PluginHost::HOOK_GET_FULL_TEXT) as $p) { + $extracted_content = $p->hook_get_full_text($url); + + if ($extracted_content) { + $content = $extracted_content; + break; + } } } |