PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.5.1
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.5.1
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 / classes / Admin / ResetButtonizer.php

ResetButtonizer.php in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 1.5.1, at classes/Admin/ResetButtonizer.php

77 lines 2.8 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 $data = (array) get_option('buttonizer_page_categories');
30
31
32 if(isset($_GET['realReset']) && $_GET['realReset'] == md5(BUTTONIZER_DIR)) {
33 $this->reset();
34
35 echo '<h1>Bibbidi Bobbidi Boo! <!-- We make mistakes too! --></h1>';
36
37 echo '<h2>The magic happened! Have fun with a clean Buttonizer!</h2>';
38 }else{
39 echo '<p><b>What happens when I click the red button at the right side?</b><br />
40 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>';
41
42 echo '<p>&nbsp;</p>';
43
44 echo '<p><b>Why would I do that?</b><br />
45 There can be many reasons to reset <b>Buttonizer</b>. One could be, you ruined the Buttonizer buttons, the settings, categories. Or maybe you want to try it out?</p>';
46
47 echo '<p>&nbsp;</p>';
48
49 echo '<p><b>What about my license?</b><br />
50 Your license won\'t be touched by this button. It only resets & remove: <ul>
51 <li>- the Buttonizer buttons</li>
52 <li>- the opening hours</li>
53 <li>- general settings</li>
54 <li>- page categories</li>
55 </ul></p>';
56
57 echo '<p>&nbsp;</p>';
58
59 echo '<p><b>Okay, and then?</b><br />
60 Then Buttonizer will get to the default values again. Like you just installed Buttonizer. Nothing more, nothing less. Everything back to normal.</p>';
61
62 }
63 }
64
65 // Reset
66 private function reset() {
67 global $oButtonizerMaintain;
68
69 update_option('buttonizer_buttons', '');
70 update_option('buttonizer_opening_settings', '');
71 update_option('buttonizer_general_settings', '');
72 update_option('buttonizer_page_categories', '');
73
74 $oButtonizerMaintain->pluginActivate();
75 }
76 }
77