PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / trunk
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell vtrunk
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 2.8.17 2.8.18 2.8.19 All 258 releases
wpfunnels / wpfnl.php

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

214 lines 6.1 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.0
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.0');
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 define('WPFNL_FUNNEL_PER_PAGE', 10);
97 define('WPFNL_TEMPLATES_OPTION_KEY', 'wpfunnels_remote_templates');
98 define('WPFNL_TESTS', false);
99 define('WPFNL_DOCUMENTATION_LINK', 'https://getwpfunnels.com/docs/wpfunnels-wordpress-funnel-builder/');
100
101
102 // Template middleman api url.
103 define('WPFNL_MIDDLEMAN_TEMPLATE_URL', 'https://license.getwpfunnels.com/api/v1/templates');
104
105 // Single template middleman api url.
106 define('WPFNL_MIDDLEMAN_SINGLE_TEMPLATE_URL', 'https://license.getwpfunnels.com/api/v1/template');
107
108 // Step middleman api url.
109 define('WPFNL_MIDDLEMAN_STEP_URL', 'https://license.getwpfunnels.com/api/v1/step');
110
111 // Template type middleman api url.
112 define('WPFNL_MIDDLEMAN_TEMPLATE_TYPE_URL', 'https://license.getwpfunnels.com/api/v1/template/type/id');
113
114 // Template category middleman api url.
115 define('WPFNL_MIDDLEMAN_TEMPLATE_CATEGORY_URL', 'https://license.getwpfunnels.com/api/v1/template/category');
116
117 define('WPFNL_ACTIVE_PLUGINS', apply_filters('active_plugins', get_option('active_plugins')));
118
119
120 define('WPFNL_TAXONOMY_TEMPLATES_BUILDER', 'template_builder');
121 define('WPFNL_TAXONOMY_TEMPLATES_PROPERTY', 'template_type');
122 define('WPFNL_TAXONOMY_TEMPLATES_INDUSTRIES', 'template_industries');
123 define('WPFNL_TAXONOMY_STEP_TYPE', 'type');
124 define('WPFNL_IS_REMOTE', false);
125 define('WPFNL_PRO', '/wpfunnels-pro/wpfnl-pro.php');
126 define('WPFNL_PRO_REQUIRED_VERSION', '1.0.4');
127 define('WPFNL_SLUG', 'wpfunnels');
128 define('WPFNL_NAME', 'WPFunnels');
129
130
131 /**
132 * The core plugin class that is used to define internationalization,
133 * admin-specific hooks, and public-facing site hooks.
134 */
135 require plugin_dir_path(__FILE__) . 'includes/class-wpfnl.php';
136
137
138 /**
139 * The code that runs during plugin activation.
140 * This action is documented in includes/class-wpfnl-activator.php
141 */
142 function activate_wpfnl()
143 {
144 require_once plugin_dir_path(__FILE__) . 'includes/utils/class-wpfnl-activator.php';
145 Wpfnl_Activator::activate();
146 }
147
148 /**
149 * The code that runs during plugin deactivation.
150 * This action is documented in includes/class-wpfnl-deactivator.php
151 */
152 function deactivate_wpfnl()
153 {
154 require_once plugin_dir_path(__FILE__) . 'includes/utils/class-wpfnl-deactivator.php';
155 Wpfnl_Deactivator::deactivate();
156 }
157
158 require_once plugin_dir_path(__FILE__) . 'vendor/autoload.php';
159 require_once plugin_dir_path(__FILE__) . 'includes/core/Tracking/class-wpfnl-telemetry.php';
160 Telemetry::init();
161
162 register_activation_hook(__FILE__, 'activate_wpfnl');
163 register_deactivation_hook(__FILE__, 'deactivate_wpfnl');
164
165
166
167 /**
168 * Function wpfnl()
169 * It is responsible for returning the instance of the plugin.
170 *
171 * @return Wpfnl
172 */
173 function wpfnl()
174 {
175 return Wpfnl::get_instance();
176 }
177
178 /**
179 * Begins execution of the plugin.
180 *
181 * Since everything within the plugin is registered via hooks,
182 * then kicking off the plugin from this point in the file does
183 * not affect the page life cycle.
184 *
185 * @since 1.0.0
186 */
187 function run_wpfnl()
188 {
189 wpfnl()->run();
190 }
191 run_wpfnl();
192
193 add_filter('et_builder_third_party_post_types', 'wpfnl_third_party_post_type', 10, 1);
194
195 /**
196 * Create a new post type for the funnel steps
197 *
198 * @access public
199 * @param string $post_types the post types.
200 * @return string
201 *
202 * @since 1.0.0
203 */
204 function wpfnl_third_party_post_type($post_types)
205 {
206 $post_types[] = WPFNL_STEPS_POST_TYPE;
207 return $post_types;
208 }
209
210
211
212
213
214