PluginProbe
Lead Generation Contact Widget & AI Chatbot: Chat Button, Phone Call, Telegram, Email – SiteLeads / trunk
Lead Generation Contact Widget & AI Chatbot: Chat Button, Phone Call, Telegram, Email – SiteLeads vtrunk
1.2.1 1.2.0 1.1.7 trunk 1.0.0 1.1.0 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6
siteleads / lib / Features / Features.php

Features.php in Lead Generation Contact Widget & AI Chatbot: Chat Button, Phone Call, Telegram, Email – SiteLeads trunk, at lib/Features/Features.php

41 lines 751 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace SiteLeads\Features;
4
5 use SiteLeads\Core\Singleton;
6 use SiteLeads\Features\Widgets\FCWidgets;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 class Features {
13
14 use Singleton;
15
16 protected function __construct() {
17 if ( is_admin() ) {
18 add_filter( 'upload_mimes', array( $this, 'allow_svg_uploads' ) );
19 }
20
21 if ( ! is_admin() ) {
22 $isAjaxOrRest = defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX );
23 if ( ! $isAjaxOrRest ) {
24 FCWidgets::load()->addHooks();
25 }
26 }
27
28 FCAnalytics::load();
29 FCPreviewWidget::load();
30 Rest::load();
31 new FrontendWidgetLoadActions();
32 }
33
34 public function allow_svg_uploads( $mimes ) {
35 $mimes['svg'] = 'image/svg+xml';
36
37 return $mimes;
38 }
39 }
40
41