-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfirmafy.php
More file actions
85 lines (73 loc) · 2.41 KB
/
firmafy.php
File metadata and controls
85 lines (73 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* Plugin Name: Firmafy Legal eSignature
* Plugin URI: https://firmafy.com
* Description: Validate legally your forms in WordPress.
* Version: 1.3.4
* Author: Firmafy
* Author URI: https://firmafy.com
* Text Domain: firmafy
* Domain Path: /languages
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*
* @package WordPress
* @author Closetechnology
* @copyright 2021 Closetechnology
* @license GPL-2.0+
*
* @wordpress-plugin
*
* Prefix: fcrm
*/
defined( 'ABSPATH' ) || die( 'No script kiddies please!' );
define( 'FIRMAFY_VERSION', '1.3.4' );
define( 'FIRMAFY_PLUGIN', __FILE__ );
define( 'FIRMAFY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'FIRMAFY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
// Includes.
require_once FIRMAFY_PLUGIN_PATH . 'includes/class-helpers-firmafy.php';
require_once FIRMAFY_PLUGIN_PATH . 'includes/forms/helpers-functions.php';
require_once FIRMAFY_PLUGIN_PATH . 'includes/class-firmafy-admin-settings.php';
require_once FIRMAFY_PLUGIN_PATH . 'includes/class-firmafy-admin-widgets.php';
require_once FIRMAFY_PLUGIN_PATH . 'includes/class-firmafy-api-webhook.php';
// Prevents fatal error is_plugin_active.
if ( ! function_exists( 'is_plugin_active' ) ) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
}
if ( ( is_plugin_active( 'gravityforms/gravityforms.php' ) || is_plugin_active( 'gravity-forms/gravityforms.php' ) ) && ! class_exists( 'FIRMAFY_Bootstrap' ) ) {
add_action( 'gform_loaded', array( 'FIRMAFY_Bootstrap', 'load' ), 5 );
/**
* Firmafy Bootstrap
*/
class FIRMAFY_Bootstrap {
/**
* Load the plugin after Gravity Forms
*
* @return void
*/
public static function load() {
if ( ! method_exists( 'GFForms', 'include_feed_addon_framework' ) ) {
return;
}
require_once FIRMAFY_PLUGIN_PATH . 'includes/forms/class-gravityforms.php';
GFAddOn::register( 'GFFirmafy' );
}
}
/**
* Get an instance of the Firmafy class
*
* @return GFFirmafy
*/
function gf_firmafy() {
return GFFirmafy::get_instance();
}
}
// ContactForms7.
if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) && ! class_exists( 'FORMSCRM_CF7_Settings' ) ) {
require_once FIRMAFY_PLUGIN_PATH . 'includes/forms/class-contactform7.php';
}
// WooCommerce.
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
require_once FIRMAFY_PLUGIN_PATH . 'includes/forms/class-woocommerce.php';
}