PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.0.6
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.0.6
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 1.0.6, at buttonizer.php

148 lines 4.8 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 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.6
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 define('BUTTONIZER_NAME', 'buttonizer');
32 define('BUTTONIZER_DIR', dirname(__FILE__));
33 define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
34 define('BUTTONIZER_VERSION','1.0.6');
35
36 # No script kiddies
37 defined( 'ABSPATH' ) or die('No script kiddies please!');
38
39 /* ================================================
40 * WELCOME TO THE BUTTONIZER SOURCE CODE!
41 *
42 * We like to see that you are courious
43 * how the code is written. When you
44 * are here to try to resolve problems
45 * you must be carefully, anything
46 * can get broken you know...
47 *
48 * -- KNOWLEDGE BASE --
49 * Did you know you can use our
50 * knowledge base?
51 * That's free!
52 *
53 * VISIT:
54 * https://knowledge.buttonizer.pro
55 *
56 * -- BUGS FOUND? --
57 * Are you here to look for a bug?
58 * Cool! If you found something
59 * you can report it to us!
60 *
61 * Maybe you get a FREE license
62 * for 1 website ;)
63 *
64 * ================================================
65 */
66
67 if(!class_exists("\\Buttonizer\\Maintain")) {
68 /* Install, deactivate and remove Buttonizer */
69 require BUTTONIZER_DIR . '/classes/default/maintain.php';
70
71 // Main stuff
72 require BUTTONIZER_DIR . '/classes/default/main.php';
73
74 // License stuff
75 require BUTTONIZER_DIR . '/classes/default/license.php';
76
77 // Admin stuff
78 require BUTTONIZER_DIR . '/classes/admin/InitializeAdmin.php';
79 }
80
81 /*
82 * License setup
83 */
84 $oButtonizer = new Buttonizer\License();
85 $oButtonizer->init();
86
87 if(!function_exists("ButtonizerLicense")) {
88 function ButtonizerLicense() {
89 global $oButtonizer;
90
91 return $oButtonizer->get();
92 }
93 }
94
95 /*
96 * Installation, removing and initiallization
97 */
98 $oButtonizerMaintain = new Buttonizer\Maintain(true, 'init');
99
100 /*
101 * Buttonizer admin stuff or button
102 */
103 if(is_admin()) {
104 // Load admin page
105 new Buttonizer\Admin\InitializeAdmin();
106 }
107 else
108 {
109 // Buttonizer button
110 new Buttonizer\Button($oButtonizerMaintain->isMobile());
111 }
112
113 /* LAST FEW FUNCTIONS */
114 if(!function_exists("buttonizer_custom_connect_message_on_update")) {
115 function buttonizer_custom_connect_message_on_update(
116 $message,
117 $user_first_name,
118 $plugin_title,
119 $user_login,
120 $site_link,
121 $freemius_link
122 ) {
123 return sprintf(
124 __fs( 'hey-x' ) . '<br>' .
125 __( 'Hey %2$s! We want to ask you to help us to improve Buttonizer! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that\'s no problem! %2$s will still be improved!', 'buttonizer' ),
126 $user_first_name,
127 '<b>' . $plugin_title . '</b>',
128 '<b>' . $user_login . '</b>',
129 $site_link,
130 $freemius_link
131 );
132 }
133 }
134
135 $oButtonizer->get()->add_action('after_uninstall', 'buttonizer_uninstall_cleanup');
136
137 // System, buttonizer is loaded
138 do_action('buttonizer_loaded');
139
140 // if(defined("BUTTONIZER_DEFINED")) {
141 // 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>";
142 // trigger_error("Error", E_USER_ERROR);
143 // exit;
144 // }
145
146 // Ok, define
147 define('BUTTONIZER_DEFINED','1.0');
148