PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 3.6.0
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v3.6.0
3.6.0 3.5.0 trunk 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 All 110 releases
buttonizer-multifunctional-button / buttonizer.php

buttonizer.php in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 3.6.0, at buttonizer.php

128 lines 4.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: Buttonizer - Smart Floating & Sticky Buttons
4 * Plugin URI: https://buttonizer.io
5 * Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
6 * Version: 3.6.0
7 * Author: Buttonizer
8 * Author URI: https://buttonizer.io
9 * License: GPLv2 or later
10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 * Text Domain: buttonizer-multifunctional-button
12 * Domain Path: /languages
13 *
14 *
15 * SOFTWARE LICENSE INFORMATION
16 *
17 * Copyright (c) 2017 Buttonizer, all rights reserved.
18 *
19 * This file is part of Buttonizer
20 *
21 * For detailed information regarding to the licensing of
22 * this software, please review the license.txt or visit:
23 * https://buttonizer.io/license/
24 */
25
26 // Define current Buttonizer version
27 define('BUTTONIZER_VERSION', '3.6.0');
28 define('BUTTONIZER_PLUGIN_FILE', __FILE__);
29
30 // Get environment vars
31 require_once __DIR__ . "/EnvVars.php";
32
33
34 # No script kiddies
35 defined('ABSPATH') or die('No script kiddies please!');
36
37 /* ================================================
38 * WELCOME TO THE BUTTONIZER SOURCE CODE!
39 *
40 * We like to see that you are courious
41 * how the code is written. If you
42 * are here to try to resolve problems
43 * you must be careful, anything
44 * can get broken you know...
45 *
46 * -- KNOWLEDGE BASE --
47 * Did you know you can use our
48 * knowledge base?
49 * That's free!
50 *
51 * VISIT:
52 * https://r.buttonizer.io/support/knowledgebase
53 *
54 * -- BUGS FOUND? --
55 * Are you here to look for a bug?
56 * Cool! If you found something
57 * you can report it to us!
58 *
59 * Maybe you get a FREE license
60 * for 1 website ;)
61 *
62 * ================================================
63 */
64
65 // Autoloader
66 require_once BUTTONIZER_APP_DIR . "/autoloader.php";
67
68 // Initialize shared core configuration
69 \Buttonizer\Core\PluginConfig::init([
70 'name' => BUTTONIZER_NAME,
71 'dir' => BUTTONIZER_DIR,
72 'app_dir' => BUTTONIZER_APP_DIR,
73 'slug' => BUTTONIZER_SLUG,
74 'version' => BUTTONIZER_VERSION,
75 'plugin_file' => BUTTONIZER_PLUGIN_FILE,
76 'base_name' => BUTTONIZER_BASE_NAME,
77 'api_uri' => BUTTONIZER_API_URI,
78 'api_timeout' => defined("BUTTONIZER_API_TIMEOUT") ? BUTTONIZER_API_TIMEOUT : 20,
79 'page_slug' => 'Buttonizer',
80 'text_domain' => 'buttonizer-multifunctional-button',
81 'review_url' => 'https://r.buttonizer.io/review/wordpress?utm_source=wp-plugin-request-review-btn',
82 'product_name' => 'Buttonizer',
83 'notice_id' => 'buttonizer-admin-notice',
84 'notice_js_function' => 'buttonizerAdminNotice',
85 'referral_slug' => 'buttonizer-plugin-menu',
86 'siblings' => [
87 'bz_contact_button' => [
88 'token_option' => 'bz_contact_button_site_connection',
89 'settings_option' => 'bz_contact_button_settings',
90 'account_option' => 'bz_contact_button_account',
91 ],
92 'bz_social_feeds' => [
93 'token_option' => 'bz_social_feeds_site_connection',
94 'settings_option' => 'bz_social_feeds_settings',
95 'account_option' => 'bz_social_feeds_account',
96 ],
97 ],
98 ]);
99
100 // Initialize
101 require_once BUTTONIZER_DIR . "/init.php";
102
103 // Uninstall
104 register_uninstall_hook(__FILE__, 'pluginUninstallEvent');
105
106 function pluginUninstallEvent()
107 {
108 // The migration bookkeeping is this plugin's own, and nothing should
109 // outlive the plugin that wrote it: a leftover entry makes a later install
110 // believe this site was already handed over. The old system's options are
111 // left where they are — those are the user's buttons, not bookkeeping.
112 if (class_exists('\\Buttonizer\\Migration\\MigrationState')) {
113 delete_option(\Buttonizer\Migration\MigrationState::OPTION);
114 }
115
116 // Skip if the is no API token being used
117 if (\Buttonizer\Core\Utils\ApiRequest::getApiToken() === false) {
118 return;
119 }
120
121 try {
122 // Invalidate access token for security reasons on uninstall
123 (new \Buttonizer\Core\Api\Connection\Disconnect)->disconnect(false);
124 } catch (\Error $err) {
125 // Errored out, nevermind then
126 }
127 }
128