PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.12.5
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.12.5
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / wpfnl.php

wpfnl.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.12.5, at wpfnl.php

213 lines 6.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The plugin bootstrap file
4 *
5 * This file is read by WordPress to generate the plugin information in the plugin
6 * admin area. This file also includes all of the dependencies used by the plugin,
7 * registers the activation and deactivation functions, and defines a function
8 * that starts the plugin.
9 *
10 * @link https://getwpfunnels.com
11 * @since 1.0.0
12 * @package Wpfnl
13 *
14 * @wordpress-plugin
15 * Plugin Name: WPFunnels
16 * Plugin URI: https://getwpfunnels.com
17 * Description: Easiest 💥 Sales Funnel Builder 💥 For WordPress & WooCommerce by WPFunnels - Generate Leads & Craft A Highly-Converting Sales Journey In Minutes
18 * Version: 3.12.5
19 * Author: WPFunnels Team
20 * Author URI: https://getwpfunnels.com
21 * License: GPL-2.0+
22 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
23 * Text Domain: wpfnl
24 * Domain Path: /languages
25 */
26
27 use WPFunnels\Tracking\Telemetry;
28 use wPFunnels\Wpfnl;
29 /**
30 * If this file is called directly, abort.
31 */
32 if (!defined('WPINC')) {
33 die;
34 }
35
36 /**
37 * Currently plugin version.
38 * Start at version 1.0.0 and use SemVer - https://semver.org
39 * Rename this for your plugin and update it as you release new versions.
40 */
41
42 if (!defined('WPFNL_VERSION')) {
43 define('WPFNL_VERSION', '3.12.5');
44 }
45
46 if (!defined('WPFNL_FILE')) {
47 define('WPFNL_FILE', __FILE__);
48 }
49
50 if (!defined('WPFNL_PATH')) {
51 define('WPFNL_PATH', dirname(WPFNL_FILE));
52 }
53
54 if (!defined('WPFNL_BASE')) {
55 define('WPFNL_BASE', plugin_basename(WPFNL_FILE));
56 }
57
58 if (!defined('WPFNL_DIR')) {
59 define('WPFNL_DIR', plugin_dir_path(WPFNL_FILE));
60 }
61
62 if (!defined('WPFNL_URL')) {
63 define('WPFNL_URL', plugins_url('/', WPFNL_FILE));
64 }
65
66 if (!defined('WPFNL_DIR_URL')) {
67 define('WPFNL_DIR_URL', plugin_dir_url(WPFNL_FILE));
68 }
69
70 if (!defined('GETWPFUNNEL_HOME_URL')) {
71 define('GETWPFUNNEL_HOME_URL', 'https://getwpfunnels.com/');
72 }
73 if (!defined('GETWPFUNNEL_PRICING_URL')) {
74 define('GETWPFUNNEL_PRICING_URL', 'https://getwpfunnels.com/pricing/');
75 }
76
77 define('WPFNL_ADMIN_DIR', WPFNL_DIR . 'admin/');
78
79
80 define('WPFNL_TEMPLATE_URL', '');
81 define('WPFNL_MAIN_PAGE_SLUG', 'wpfunnels');
82 define('WPFNL_FUNNEL_PAGE_SLUG', 'wp_funnels');
83 define('WPFNL_TEMPLATE_PAGE_SLUG', 'wpf_templates');
84 define('WPFNL_SETTINGS_SLUG', 'wp_funnel_settings');
85 define('WPFNL_EDIT_FUNNEL_SLUG', 'edit_funnel');
86 define('WPFNL_TRASH_FUNNEL_SLUG', 'trash_funnels');
87 define('WPFNL_FUNNELS_POST_TYPE', 'wpfunnels');
88 define('WPFNL_STEPS_POST_TYPE', 'wpfunnel_steps');
89 define('WPFNL_CREATE_FUNNEL_SLUG', 'create_funnel');
90 define('WPFNL_GLOBAL_SETTINGS_SLUG', 'wpfnl_settings');
91 define('WPFNL_AUTOMATIONS_SLUG', 'wpfnl_automations');
92 define('WPFNL_ADDONS_SLUG', 'wpfnl_addons');
93 define('WPFNL_STORE_CHECKOUT_SLUG', 'store_checkout');
94 define('WPFNL_INTEGRATIONS_MAIN_PAGE_SLUG', 'wpfunnels_integrations');
95 define('WPFNL_FUNNEL_PER_PAGE', 10);
96 define('WPFNL_TEMPLATES_OPTION_KEY', 'wpfunnels_remote_templates');
97 define('WPFNL_TESTS', false);
98 define('WPFNL_DOCUMENTATION_LINK', 'https://getwpfunnels.com/docs/wpfunnels-wordpress-funnel-builder/');
99
100
101 // Template middleman api url.
102 define('WPFNL_MIDDLEMAN_TEMPLATE_URL', 'https://license.getwpfunnels.com/api/v1/templates');
103
104 // Single template middleman api url.
105 define('WPFNL_MIDDLEMAN_SINGLE_TEMPLATE_URL', 'https://license.getwpfunnels.com/api/v1/template');
106
107 // Step middleman api url.
108 define('WPFNL_MIDDLEMAN_STEP_URL', 'https://license.getwpfunnels.com/api/v1/step');
109
110 // Template type middleman api url.
111 define('WPFNL_MIDDLEMAN_TEMPLATE_TYPE_URL', 'https://license.getwpfunnels.com/api/v1/template/type/id');
112
113 // Template category middleman api url.
114 define('WPFNL_MIDDLEMAN_TEMPLATE_CATEGORY_URL', 'https://license.getwpfunnels.com/api/v1/template/category');
115
116 define('WPFNL_ACTIVE_PLUGINS', apply_filters('active_plugins', get_option('active_plugins')));
117
118
119 define('WPFNL_TAXONOMY_TEMPLATES_BUILDER', 'template_builder');
120 define('WPFNL_TAXONOMY_TEMPLATES_PROPERTY', 'template_type');
121 define('WPFNL_TAXONOMY_TEMPLATES_INDUSTRIES', 'template_industries');
122 define('WPFNL_TAXONOMY_STEP_TYPE', 'type');
123 define('WPFNL_IS_REMOTE', false);
124 define('WPFNL_PRO', '/wpfunnels-pro/wpfnl-pro.php');
125 define('WPFNL_PRO_REQUIRED_VERSION', '1.0.4');
126 define('WPFNL_SLUG', 'wpfunnels');
127 define('WPFNL_NAME', 'WPFunnels');
128
129
130 /**
131 * The core plugin class that is used to define internationalization,
132 * admin-specific hooks, and public-facing site hooks.
133 */
134 require plugin_dir_path(__FILE__) . 'includes/class-wpfnl.php';
135
136
137 /**
138 * The code that runs during plugin activation.
139 * This action is documented in includes/class-wpfnl-activator.php
140 */
141 function activate_wpfnl()
142 {
143 require_once plugin_dir_path(__FILE__) . 'includes/utils/class-wpfnl-activator.php';
144 Wpfnl_Activator::activate();
145 }
146
147 /**
148 * The code that runs during plugin deactivation.
149 * This action is documented in includes/class-wpfnl-deactivator.php
150 */
151 function deactivate_wpfnl()
152 {
153 require_once plugin_dir_path(__FILE__) . 'includes/utils/class-wpfnl-deactivator.php';
154 Wpfnl_Deactivator::deactivate();
155 }
156
157 require_once plugin_dir_path(__FILE__) . 'vendor/autoload.php';
158 require_once plugin_dir_path(__FILE__) . 'includes/core/Tracking/class-wpfnl-telemetry.php';
159 Telemetry::init();
160
161 register_activation_hook(__FILE__, 'activate_wpfnl');
162 register_deactivation_hook(__FILE__, 'deactivate_wpfnl');
163
164
165
166 /**
167 * Function wpfnl()
168 * It is responsible for returning the instance of the plugin.
169 *
170 * @return Wpfnl
171 */
172 function wpfnl()
173 {
174 return Wpfnl::get_instance();
175 }
176
177 /**
178 * Begins execution of the plugin.
179 *
180 * Since everything within the plugin is registered via hooks,
181 * then kicking off the plugin from this point in the file does
182 * not affect the page life cycle.
183 *
184 * @since 1.0.0
185 */
186 function run_wpfnl()
187 {
188 wpfnl()->run();
189 }
190 run_wpfnl();
191
192 add_filter('et_builder_third_party_post_types', 'wpfnl_third_party_post_type', 10, 1);
193
194 /**
195 * Create a new post type for the funnel steps
196 *
197 * @access public
198 * @param string $post_types the post types.
199 * @return string
200 *
201 * @since 1.0.0
202 */
203 function wpfnl_third_party_post_type($post_types)
204 {
205 $post_types[] = WPFNL_STEPS_POST_TYPE;
206 return $post_types;
207 }
208
209
210
211
212
213