PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.0.4
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.0.4
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 / trunk / classes / admin / ResetButtonizer.php

ResetButtonizer.php in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 1.0.4, at trunk/classes/admin/ResetButtonizer.php

74 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License
5 as published by the Free Software Foundation; either version 2
6 of the License, or (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16
17 Copyright 2017 Buttonizer
18 */
19
20 namespace Buttonizer\Admin;
21
22 # No script kiddies
23 defined( 'ABSPATH' ) or die('No script kiddies please!');
24
25 class ResetButtonizer {
26
27 public function __construct() {
28
29 if(isset($_GET['realReset']) && $_GET['realReset'] == md5(BUTTONIZER_DIR)) {
30 $this->reset();
31
32 echo '<h1>Bibbidi Bobbidi Boo!</h1>';
33
34 echo '<h2>The magic happened! Have fun with a clean Buttonizer :)</h2>';
35 }else{
36 echo '<p><b>What happens when I click the cool red button at the right side?</b><br />
37 What will happen is that the plugin will get a \'reset\'. All changes to Buttonizer will get reversed. From then you can start all-over again.</p>';
38
39 echo '<p>&nbsp;</p>';
40
41 echo '<p><b>Why would I do that?</b><br />
42 There can be many reasons to use the <b>red button</b>. One could be, you ruined the Buttonizer buttons, the settings, categories and you almost blew up your computer. Then you can use it. Or if you want to try it.</p>';
43
44 echo '<p>&nbsp;</p>';
45
46 echo '<p><b>What about my license?</b><br />
47 The license will not be touched. This button does only reset & remove: <ul>
48 <li>- the Buttonizer buttons</li>
49 <li>- the opening hours</li>
50 <li>- general settings</li>
51 <li>- page categories</li>
52 </ul></p>';
53
54 echo '<p>&nbsp;</p>';
55
56 echo '<p><b>Okay, and then?</b><br />
57 Then Buttonizer will get to the default values again. Like you just installed Buttonizer. Nothing more, nothing less. Everything back to normal.</p>';
58
59 }
60 }
61
62 // Reset
63 private function reset() {
64 global $oButtonizerMaintain;
65
66 update_option('buttonizer_buttons', '');
67 update_option('buttonizer_opening_settings', '');
68 update_option('buttonizer_general_settings', '');
69 update_option('buttonizer_page_categories', '');
70
71 $oButtonizerMaintain->pluginActivate();
72 }
73 }
74