From f7f0d2b265b764e1a7bb032473108ca2cfaeb4a5 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 6 Dec 2015 20:45:21 -0800 Subject: provide plugin hooks for blacklist checking functions. --- include/network.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/network.php') diff --git a/include/network.php b/include/network.php index f386afc8e..5895d302b 100644 --- a/include/network.php +++ b/include/network.php @@ -1822,6 +1822,13 @@ function check_siteallowed($url) { $retvalue = true; + + $arr = array('url' => $url); + call_hooks('check_siteallowed',$arr); + + if(array_key_exists('allowed',$arr)) + return $arr['allowed']; + $bl1 = get_config('system','whitelisted_sites'); if(is_array($bl1) && $bl1) { foreach($bl1 as $bl) { @@ -1848,6 +1855,12 @@ function check_channelallowed($hash) { $retvalue = true; + $arr = array('hash' => $hash); + call_hooks('check_channelallowed',$arr); + + if(array_key_exists('allowed',$arr)) + return $arr['allowed']; + $bl1 = get_config('system','whitelisted_channels'); if(is_array($bl1) && $bl1) { foreach($bl1 as $bl) { -- cgit v1.2.3