PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.7.5
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.7.5
2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 1.1.0 All 77 releases
fluent-community / app / Hooks / filters.php

filters.php in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 2.7.5, at app/Hooks/filters.php

35 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (!defined('ABSPATH')) { exit; // Exit if accessed directly
2 }
3
4 /**
5 * @var FluentCommunity\Framework\Foundation\Application $app
6 */
7
8 $app->addFilter('fluent_community/auth/signup_fields', function ($fields) {
9 $authSettings = \FluentCommunity\App\Services\AuthenticationService::getAuthSettings();
10 if (!empty($authSettings['signup']['form']['fields']['terms'])) {
11 $fields['terms'] = $authSettings['signup']['form']['fields']['terms'];
12 }
13 return $fields;
14 }, 10, 1);
15
16 $app->addFilter('fluent_community/lockscreen_fields', function ($fields) {
17 $unavailableFields = [];
18
19 if (!defined('FLUENTCART_VERSION')) {
20 $unavailableFields[] = 'paywall';
21 }
22
23 if (!defined('FLUENT_COMMUNITY_PRO_VERSION')) {
24 $unavailableFields[] = 'welcome_banner';
25 }
26
27 if (!$unavailableFields) {
28 return $fields;
29 }
30
31 return array_values(array_filter($fields, function ($field) use ($unavailableFields) {
32 return !in_array($field['name'] ?? '', $unavailableFields);
33 }));
34 }, 10, 1);
35