PluginProbe
FormsCRM – Connect Forms to CRM directly / 3.1
FormsCRM – Connect Forms to CRM directly v3.1
4.4.3 4.4.2 4.4.1 4.4.0 4.3.3 trunk 1.1.0 1.2.0 1.2.1 3.0 3.1 3.1.1 3.10.0 3.11.0 3.12.0 3.12.2 3.12.3 3.12.4 3.13.0 3.13.1 3.13.2 3.13.3 3.13.4 3.13.5 3.14.0 All 63 releases
formscrm / formscrm.php

formscrm.php in FormsCRM – Connect Forms to CRM directly 3.1, at formscrm.php

99 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: FormsCRM
4 * Plugin URI: https://closemarketing.net/formscrm
5 * Description: Connects Forms with CRM.
6 * Version: 3.1
7 * Author: Closemarketing
8 * Author URI: https://close.marketing
9 * Text Domain: formscrm
10 * Domain Path: /languages
11 * License: GPL-2.0+
12 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13 *
14 * @package WordPress
15 * @author Closemarketing
16 * @copyright 2021 Closemarketing
17 * @license GPL-2.0+
18 *
19 * @wordpress-plugin
20 *
21 * Prefix: fcrm
22 */
23
24 defined( 'ABSPATH' ) || die( 'No script kiddies please!' );
25
26 add_action( 'plugins_loaded', 'fcrm_plugin_init' );
27 /**
28 * Load localization files
29 *
30 * @return void
31 */
32 function fcrm_plugin_init() {
33 load_plugin_textdomain( 'formscrm', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
34 }
35
36 define( 'FORMSCRM_VERSION', '3.0' );
37
38 require_once 'includes/debug.php';
39 require_once 'includes/class-library-crm.php';
40 require_once 'includes/class-admin-options.php';
41
42 if ( is_plugin_active( 'gravityforms/gravityforms.php' ) || is_plugin_active( 'gravity-forms/gravityforms.php' ) ) {
43 add_action( 'gform_loaded', array( 'GF_CRM_Bootstrap', 'load' ), 5 );
44 class GF_CRM_Bootstrap {
45
46 public static function load() {
47
48 if ( ! method_exists( 'GFForms', 'include_feed_addon_framework' ) ) {
49 return;
50 }
51
52 require_once 'includes/class-gravityforms.php';
53
54 GFAddOn::register( 'GFCRM' );
55 }
56 }
57
58 function gf_crm() {
59 return GFCRM::get_instance();
60 }
61 }
62
63
64 if ( ! function_exists( 'formscrm_fs' ) ) {
65 // Create a helper function for easy SDK access.
66 function formscrm_fs() {
67 global $formscrm_fs;
68
69 if ( ! isset( $formscrm_fs ) ) {
70 // Include Freemius SDK.
71 require_once dirname( __FILE__ ) . '/vendor/freemius/wordpress-sdk/start.php';
72
73 $formscrm_fs = fs_dynamic_init(
74 array(
75 'id' => '8504',
76 'slug' => 'formscrm',
77 'type' => 'plugin',
78 'public_key' => 'pk_fa93ef3eb788d04ac4803d15c1511',
79 'is_premium' => false,
80 'has_addons' => true,
81 'has_paid_plans' => false,
82 'navigation' => 'tabs',
83 'menu' => array(
84 'slug' => 'formscrm',
85 'first-path' => 'admin.php?page=formscrm',
86 ),
87 )
88 );
89 }
90
91 return $formscrm_fs;
92 }
93
94 // Init Freemius.
95 formscrm_fs();
96 // Signal that SDK was initiated.
97 do_action( 'formscrm_fs_loaded' );
98 }
99