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
← All changes | buttonizer.php +127 -158 1.0.103.6.0 View file →
@@ -1,158 +1,127 @@
1 -<?php
2 -/*
3 -Plugin Name: Buttonizer - Smart Floating Action Button
4 -Plugin URI: https://buttonizer.pro
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: 1.0.10
7 -Author: Buttonizer
8 -Author URI: https://buttonizer.pro
9 -License: GPL2
10 -License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 -Text Domain: wporg
12 -*/
13 -/*
14 -This program is free software; you can redistribute it and/or
15 -modify it under the terms of the GNU General Public License
16 -as published by the Free Software Foundation; either version 2
17 -of the License, or (at your option) any later version.
18 -
19 -This program is distributed in the hope that it will be useful,
20 -but WITHOUT ANY WARRANTY; without even the implied warranty of
21 -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 -GNU General Public License for more details.
23 -
24 -You should have received a copy of the GNU General Public License
25 -along with this program; if not, write to the Free Software
26 -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 -
28 -Copyright 2017 Buttonizer
29 -*/
30 -
31 -// error_reporting(E_ALL);
32 -
33 -define('BUTTONIZER_NAME', 'buttonizer');
34 -define('BUTTONIZER_DIR', dirname(__FILE__));
35 -define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
36 -define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
37 -define('BUTTONIZER_VERSION','1.0.10');
38 -
39 -# No script kiddies
40 -defined( 'ABSPATH' ) or die('No script kiddies please!');
41 -
42 -/* ================================================
43 - * WELCOME TO THE BUTTONIZER SOURCE CODE!
44 - *
45 - * We like to see that you are courious
46 - * how the code is written. When you
47 - * are here to try to resolve problems
48 - * you must be carefully, anything
49 - * can get broken you know...
50 - *
51 - * -- KNOWLEDGE BASE --
52 - * Did you know you can use our
53 - * knowledge base?
54 - * That's free!
55 - *
56 - * VISIT:
57 - * https://knowledge.buttonizer.pro
58 - *
59 - * -- BUGS FOUND? --
60 - * Are you here to look for a bug?
61 - * Cool! If you found something
62 - * you can report it to us!
63 - *
64 - * Maybe you get a FREE license
65 - * for 1 website ;)
66 - *
67 - * ================================================
68 - */
69 -
70 -if(!class_exists("\\Buttonizer\\Maintain")) {
71 - /* Install, deactivate and remove Buttonizer */
72 - require BUTTONIZER_DIR . '/classes/default/maintain.php';
73 -
74 - // Main stuff
75 - require BUTTONIZER_DIR . '/classes/default/main.php';
76 -
77 - // License stuff
78 - require BUTTONIZER_DIR . '/classes/default/license.php';
79 -
80 - // Admin stuff
81 - require BUTTONIZER_DIR . '/classes/admin/InitializeAdmin.php';
82 -}
83 -
84 -/*
85 - * License setup
86 - */
87 -$oButtonizer = new Buttonizer\License();
88 -$oButtonizer->init();
89 -
90 -if(!function_exists("ButtonizerLicense")) {
91 - function ButtonizerLicense() {
92 - global $oButtonizer;
93 -
94 - return $oButtonizer->get();
95 - }
96 -}
97 -
98 -/*
99 - * Installation, removing and initiallization
100 - */
101 -$oButtonizerMaintain = new Buttonizer\Maintain(true, 'init');
102 -
103 -/*
104 - * Buttonizer admin stuff or button
105 - */
106 -if(is_admin()) {
107 - // Load admin page
108 - new Buttonizer\Admin\InitializeAdmin();
109 -}
110 -else
111 -{
112 - // Buttonizer button
113 - new Buttonizer\Button($oButtonizerMaintain->isMobile());
114 -}
115 -
116 -/* LAST FEW FUNCTIONS */
117 -if(!function_exists("buttonizer_custom_connect_message")) {
118 - function buttonizer_custom_connect_message(
119 - $message,
120 - $user_first_name,
121 - $plugin_title,
122 - $user_login,
123 - $site_link,
124 - $freemius_link
125 - ) {
126 - return sprintf(
127 - __( 'Hey %1$s' ) . ',<br>' .
128 - '<br />' .
129 - __( 'Click on Allow & Continue to start Buttonizing your website :)! Create Floating Action Buttons & Floating Menu\'s. Decide on a number of click actions like start chatting with Whatsapp, click-to-call, open a URL and more.') . '<br />' .
130 - '<br />' .
131 - __('Never miss an important update -- opt-in to our security and feature updates notifications​.') . '<br />' .
132 - '<br />' .
133 - __('​See you on the other side.')
134 - ,
135 - $user_first_name,
136 - '<b>' . $plugin_title . '</b>',
137 - '<b>' . $user_login . '</b>',
138 - $site_link,
139 - $freemius_link
140 - );
141 - }
142 -
143 - $oButtonizer->get()->add_filter('connect_message', 'buttonizer_custom_connect_message', 10, 6);
144 -}
145 -
146 -$oButtonizer->get()->add_action('after_uninstall', 'buttonizer_uninstall_cleanup');
147 -
148 -// System, buttonizer is loaded
149 -do_action('buttonizer_loaded');
150 -
151 -// if(defined("BUTTONIZER_DEFINED")) {
152 -// echo "<div style='clear: both;'></div><img src='". plugins_url('/assets/buttonizer.png', BUTTONIZER_PLUGIN_DIR) ."' style='height: 40px; margin-right: 10px; float: left; vertical-align: top;'> Hey, looks like you try to install me (Buttonizer), while you already have an older version (or the free version) installed and activated? Deactivate all older Buttonizer plugins before trying again.<div style='clear: both; height: 20px'></div>";
153 -// trigger_error("Error", E_USER_ERROR);
154 -// exit;
155 -// }
156 -
157 -// Ok, define
158 -define('BUTTONIZER_DEFINED','1.0');
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 +}