PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.3
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.3
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.13.3, at wpfnl.php

224 lines 6.7 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.13.3
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.13.3');
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_AI_FUNNEL_PAGE_SLUG', 'wpfnl-ai-funnel');
91 define('WPFNL_GLOBAL_SETTINGS_SLUG', 'wpfnl_settings');
92 define('WPFNL_AUTOMATIONS_SLUG', 'wpfnl_automations');
93 define('WPFNL_ADDONS_SLUG', 'wpfnl_addons');
94 define('WPFNL_STORE_CHECKOUT_SLUG', 'store_checkout');
95 define('WPFNL_INTEGRATIONS_MAIN_PAGE_SLUG', 'wpfunnels_integrations');
96 // React single-page admin. Runs alongside the existing screens while they are
97 // migrated one at a time; routes live in the hash (#/settings, …).
98 define('WPFNL_REACT_ADMIN_SLUG', 'wpfunnels-admin');
99 define('WPFNL_FUNNEL_PER_PAGE', 10);
100 define('WPFNL_TEMPLATES_OPTION_KEY', 'wpfunnels_remote_templates');
101 define('WPFNL_TESTS', false);
102 define('WPFNL_DOCUMENTATION_LINK', 'https://getwpfunnels.com/docs/wpfunnels-wordpress-funnel-builder/');
103
104
105 // Template middleman api url.
106 define('WPFNL_MIDDLEMAN_TEMPLATE_URL', 'https://license.getwpfunnels.com/api/v1/templates');
107
108 // Single template middleman api url.
109 define('WPFNL_MIDDLEMAN_SINGLE_TEMPLATE_URL', 'https://license.getwpfunnels.com/api/v1/template');
110
111 // Step middleman api url.
112 define('WPFNL_MIDDLEMAN_STEP_URL', 'https://license.getwpfunnels.com/api/v1/step');
113
114 // Template type middleman api url.
115 define('WPFNL_MIDDLEMAN_TEMPLATE_TYPE_URL', 'https://license.getwpfunnels.com/api/v1/template/type/id');
116
117 // Template category middleman api url.
118 define('WPFNL_MIDDLEMAN_TEMPLATE_CATEGORY_URL', 'https://license.getwpfunnels.com/api/v1/template/category');
119
120 define('WPFNL_ACTIVE_PLUGINS', apply_filters('active_plugins', get_option('active_plugins')));
121
122
123 define('WPFNL_TAXONOMY_TEMPLATES_BUILDER', 'template_builder');
124 define('WPFNL_TAXONOMY_TEMPLATES_PROPERTY', 'template_type');
125 define('WPFNL_TAXONOMY_TEMPLATES_INDUSTRIES', 'template_industries');
126 define('WPFNL_TAXONOMY_STEP_TYPE', 'type');
127 define('WPFNL_IS_REMOTE', false);
128 define('WPFNL_PRO', '/wpfunnels-pro/wpfnl-pro.php');
129 define('WPFNL_PRO_REQUIRED_VERSION', '1.0.4');
130 define('WPFNL_SLUG', 'wpfunnels');
131 define('WPFNL_NAME', 'WPFunnels');
132
133
134 /**
135 * The core plugin class that is used to define internationalization,
136 * admin-specific hooks, and public-facing site hooks.
137 */
138 require plugin_dir_path(__FILE__) . 'includes/class-wpfnl.php';
139
140
141 /**
142 * The code that runs during plugin activation.
143 * This action is documented in includes/class-wpfnl-activator.php
144 */
145 function activate_wpfnl()
146 {
147 require_once plugin_dir_path(__FILE__) . 'includes/utils/class-wpfnl-activator.php';
148 Wpfnl_Activator::activate();
149 }
150
151 /**
152 * The code that runs during plugin deactivation.
153 * This action is documented in includes/class-wpfnl-deactivator.php
154 */
155 function deactivate_wpfnl()
156 {
157 require_once plugin_dir_path(__FILE__) . 'includes/utils/class-wpfnl-deactivator.php';
158 Wpfnl_Deactivator::deactivate();
159 }
160
161 /*
162 * Registered before the telemetry client is built: the SDK registers its own
163 * deactivation callback when constructed, at the same priority, and that one
164 * deletes the "feedback modal submitted" transient. wpfunnels_plugin_deactivated
165 * (which sends the activity trail) has to read it first.
166 */
167 register_activation_hook(__FILE__, 'activate_wpfnl');
168 register_deactivation_hook(__FILE__, 'deactivate_wpfnl');
169
170 require_once plugin_dir_path(__FILE__) . 'vendor/autoload.php';
171 require_once plugin_dir_path(__FILE__) . 'includes/core/Tracking/class-wpfnl-activity-trail.php';
172 require_once plugin_dir_path(__FILE__) . 'includes/core/Tracking/class-wpfnl-telemetry.php';
173 Telemetry::init();
174
175
176
177 /**
178 * Function wpfnl()
179 * It is responsible for returning the instance of the plugin.
180 *
181 * @return Wpfnl
182 */
183 function wpfnl()
184 {
185 return Wpfnl::get_instance();
186 }
187
188 /**
189 * Begins execution of the plugin.
190 *
191 * Since everything within the plugin is registered via hooks,
192 * then kicking off the plugin from this point in the file does
193 * not affect the page life cycle.
194 *
195 * @since 1.0.0
196 */
197 function run_wpfnl()
198 {
199 wpfnl()->run();
200 }
201 run_wpfnl();
202
203 add_filter('et_builder_third_party_post_types', 'wpfnl_third_party_post_type', 10, 1);
204
205 /**
206 * Create a new post type for the funnel steps
207 *
208 * @access public
209 * @param string $post_types the post types.
210 * @return string
211 *
212 * @since 1.0.0
213 */
214 function wpfnl_third_party_post_type($post_types)
215 {
216 $post_types[] = WPFNL_STEPS_POST_TYPE;
217 return $post_types;
218 }
219
220
221
222
223
224