aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-18 14:11:15 -0800
committerzotlabs <mike@macgirvin.com>2018-01-18 14:11:15 -0800
commit0fba1bb868254c3731d03d9bf5d1b19a8b71b265 (patch)
treed58452d84ea99a7afbced9cb7ecb3e982077c682 /include
parenteb86ffefbfb38cf76316940a6aa164530f9b9348 (diff)
downloadvolse-hubzilla-0fba1bb868254c3731d03d9bf5d1b19a8b71b265.tar.gz
volse-hubzilla-0fba1bb868254c3731d03d9bf5d1b19a8b71b265.tar.bz2
volse-hubzilla-0fba1bb868254c3731d03d9bf5d1b19a8b71b265.zip
simplify interactions with the get_features hook by calling it before any filtering takes place
Diffstat (limited to 'include')
-rw-r--r--include/features.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/features.php b/include/features.php
index 36eb74a9d..839faff67 100644
--- a/include/features.php
+++ b/include/features.php
@@ -190,6 +190,16 @@ function get_features($filtered = true) {
feature_level('event_tz_select',2),
],
+
+ [
+ 'premium_channel',
+ t('Premium Channel'),
+ t('Allows you to set restrictions and terms on those that connect with your channel'),
+ false,
+ get_config('feature_lock','premium_channel'),
+ feature_level('premium_channel',4),
+ ],
+
[
'advanced_dirsearch',
t('Advanced Directory Search'),
@@ -438,16 +448,10 @@ function get_features($filtered = true) {
],
];
+ $x = [ 'features' => $arr, ];
+ call_hooks('get_features',$x);
- $arr['general'][] = [
- 'premium_channel',
- t('Premium Channel'),
- t('Allows you to set restrictions and terms on those that connect with your channel'),
- false,
- get_config('feature_lock','premium_channel'),
- feature_level('premium_channel',4),
- ];
-
+ $arr = $x['features'];
$techlevel = get_account_techlevel();
@@ -482,7 +486,5 @@ function get_features($filtered = true) {
$narr = $arr;
}
- $x = [ 'features' => $narr, 'filtered' => $filtered, 'techlevel' => $techlevel ];
- call_hooks('get_features',$x);
- return $x['features'];
+ return $narr;
}