PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.7.0
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.7.0
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
bit-form / includes / Core / Util / Utilities.php

Utilities.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.7.0, at includes/Core/Util/Utilities.php

36 lines 899 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace BitCode\BitForm\Core\Util;
4
5 final class Utilities
6 {
7 public static function isPro()
8 {
9 $integrateData = get_option('bitformpro_integrate_key_data');
10 $isProLicenseActivated = !empty($integrateData) && is_array($integrateData) && 'success' === $integrateData['status'];
11 return class_exists('BitCode\\BitFormPro\\Plugin') && $isProLicenseActivated;
12 }
13
14 public static function getRealPath($dir, $name)
15 {
16 if (!isset($dir)) return false;
17 $directories = array_diff(scandir($dir), array('..', '.'));
18 $name = strtolower($name);
19
20 foreach ($directories as $directory) {
21 $dirLower = strtolower($directory);
22 if ($dirLower === $name) {
23 return $directory;
24 }
25 }
26
27 return false;
28 }
29
30 public static function getFileNameExceptExtension($filename)
31 {
32 $path_parts = pathinfo($filename);
33 return $path_parts['filename'];
34 }
35 }
36