WordPress Database Reset - Version 3.18

Version Description

  • 2021/01/30
  • added flyout menu
  • started to phase out this plugin in favor of WP Reset
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 WordPress Database Reset
Version 3.18
Comparing to
See all releases

Code changes from version 3.17 to 3.18

assets/css/database-reset.css CHANGED
@@ -38,6 +38,7 @@ p {
38
  #wp-reset-ad img {
39
  float: left;
40
  margin-right: 20px;
 
41
  width: 100px;
42
  }
43
 
@@ -84,4 +85,4 @@ p {
84
  margin-top: 20px;
85
  }
86
 
87
- /* wpr upsell dialog */
38
  #wp-reset-ad img {
39
  float: left;
40
  margin-right: 20px;
41
+ margin-bottom: 20px;
42
  width: 100px;
43
  }
44
 
85
  margin-top: 20px;
86
  }
87
 
88
+ /* wpr upsell dialog */
class-db-reset-admin.php CHANGED
@@ -61,8 +61,6 @@ if (!class_exists('DB_Reset_Admin')) :
61
  add_action('admin_menu', array($this, 'add_tools_menu'));
62
  add_action('admin_action_install_wpr', array($this, 'install_wpr'));
63
 
64
- add_filter('install_plugins_table_api_args_featured', array($this, 'featured_plugins_tab'));
65
- add_filter('install_plugins_table_api_args_recommended', array($this, 'featured_plugins_tab'));
66
  add_filter('plugin_action_links_' . plugin_basename(DB_RESET_FILE), array($this, 'plugin_action_links'));
67
  add_filter('plugin_row_meta', array($this, 'plugin_meta_links'), 10, 2);
68
  add_filter('admin_footer_text', array($this, 'admin_footer_text'));
@@ -109,67 +107,6 @@ if (!class_exists('DB_Reset_Admin')) :
109
  } // plugin_meta_links
110
 
111
 
112
- // helper function for adding plugins to fav list
113
- function featured_plugins_tab($args)
114
- {
115
- add_filter('plugins_api_result', array($this, 'plugins_api_result'), 10, 3);
116
-
117
- return $args;
118
- } // featured_plugins_tab
119
-
120
-
121
- // add our plugins to recommended list
122
- function plugins_api_result($res, $action, $args)
123
- {
124
- remove_filter('plugins_api_result', array($this, 'plugins_api_result'), 10, 3);
125
-
126
- $res = $this->add_plugin_favs('under-construction-page', $res);
127
- $res = $this->add_plugin_favs('simple-author-box', $res);
128
- $res = $this->add_plugin_favs('eps-301-redirects', $res);
129
-
130
- return $res;
131
- } // plugins_api_result
132
-
133
-
134
- function add_plugin_favs($plugin_slug, $res)
135
- {
136
- // check if plugin is already on the list
137
- if (!empty($res->plugins) && is_array($res->plugins)) {
138
- foreach ($res->plugins as $plugin) {
139
- if (is_object($plugin) && !empty($plugin->slug) && $plugin->slug == $plugin_slug) {
140
- return $res;
141
- }
142
- } // foreach
143
- }
144
-
145
- $plugin_info = get_transient('wf-plugin-info-' . $plugin_slug);
146
-
147
- if (!$plugin_info) {
148
- $plugin_info = plugins_api('plugin_information', array(
149
- 'slug' => $plugin_slug,
150
- 'is_ssl' => is_ssl(),
151
- 'fields' => array(
152
- 'banners' => true,
153
- 'reviews' => true,
154
- 'downloaded' => true,
155
- 'active_installs' => true,
156
- 'icons' => true,
157
- 'short_description' => true,
158
- )
159
- ));
160
- if (!is_wp_error($plugin_info)) {
161
- set_transient('wf-plugin-info-' . $plugin_slug, $plugin_info, DAY_IN_SECONDS * 7);
162
- }
163
- }
164
-
165
- if (!empty($res->plugins) && is_array($res->plugins) && $plugin_info && is_object($plugin_info)) {
166
- array_unshift($res->plugins, $plugin_info);
167
- }
168
-
169
- return $res;
170
- } // add_plugin_featured
171
-
172
-
173
  // auto download / install / activate WPR plugin
174
  function install_wpr()
175
  {
61
  add_action('admin_menu', array($this, 'add_tools_menu'));
62
  add_action('admin_action_install_wpr', array($this, 'install_wpr'));
63
 
 
 
64
  add_filter('plugin_action_links_' . plugin_basename(DB_RESET_FILE), array($this, 'plugin_action_links'));
65
  add_filter('plugin_row_meta', array($this, 'plugin_meta_links'), 10, 2);
66
  add_filter('admin_footer_text', array($this, 'admin_footer_text'));
107
  } // plugin_meta_links
108
 
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  // auto download / install / activate WPR plugin
111
  function install_wpr()
112
  {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: database, reset, restore, database reset, wp reset, reset wp, developer, d
4
  Requires at least: 4.2
5
  Requires PHP: 5.2
6
  Tested up to: 5.6
7
- Stable tag: 3.17
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,9 +12,9 @@ Skip reinstalling WP to reset it & reset the WordPress database back to its orig
12
 
13
  == Description ==
14
 
15
- The WordPress Database Reset plugin allows you to **reset the database** (all tables or the ones you choose) back to its default settings without having to go through the WordPress 5 minute installation or having to modify any files.
16
 
17
- > Need more reset tools? To individually reset plugins, themes, transients or media? Or perhaps database snapshots so you can restore your WP site with one click if you made a mistake? Then check out our free sister plugin - <a href="https://wordpress.org/plugins/wp-reset/">WP Reset</a>.
18
 
19
  **Features**
20
 
@@ -65,6 +65,11 @@ WP Database Reset was originally developed in October 2011 by <a href="https://g
65
 
66
  == Changelog ==
67
 
 
 
 
 
 
68
  = 3.17 =
69
  * 2020/10/06
70
  * license fix
4
  Requires at least: 4.2
5
  Requires PHP: 5.2
6
  Tested up to: 5.6
7
+ Stable tag: 3.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ This plugin will soon be replaced by the free <a href="https://wordpress.org/plugins/wp-reset/">WP Reset</a> plugin. It has a lot more reset tools to individually reset plugins, themes, transients and media. You can also create database snapshots to restore your WP site with one click if you make a mistake.
16
 
17
+ The WordPress Database Reset plugin allows you to **reset the database** (all tables or the ones you choose) back to its default settings without having to go through the WordPress 5 minute installation or having to modify any files.
18
 
19
  **Features**
20
 
65
 
66
  == Changelog ==
67
 
68
+ = 3.18 =
69
+ * 2021/01/30
70
+ * added flyout menu
71
+ * started to phase out this plugin in favor of WP Reset
72
+
73
  = 3.17 =
74
  * 2020/10/06
75
  * license fix
views/index.php CHANGED
@@ -1,6 +1,7 @@
1
  <div class="wrap card" id="wp-reset-ad">
2
- <a href="#" class="open-wpr-upsell"><img src="<?php echo plugins_url( 'assets/images/wp-reset-icon.png', DB_RESET_FILE ); ?>" alt="WP Reset - used on +200,000 sites" title="WP Reset - used on +200,000 sites"></a>
3
- <p>Need more control over what gets reset? Automatic backups when you reset or when WordPress updates something without asking you? <a href="#" class="open-wpr-upsell">Install the free WP Reset plugin</a>. It's used on <b>+250,000 sites daily</b>!</p>
 
4
  </div>
5
 
6
  <div class="wrap card">
@@ -16,15 +17,12 @@
16
 
17
  </div>
18
 
19
- <div class="wrap card">
20
- <p>Like the plugin? Please <a href="https://wordpress.org/support/plugin/wordpress-database-reset/reviews/#new-post" target="_blank">rate it &starf;&starf;&starf;&starf;&starf;</a>. It's what keeps it free &amp; maintained.<br><b>Thank you!</b></p>
21
- </div>
22
 
23
  <div id="wpr-upsell-dialog" style="display: none;" title="WP Reset">
24
  <span class="ui-helper-hidden-accessible"><input type="text"/></span>
25
  <div style="padding: 20px; font-size: 15px;">
26
  <ul>
27
- <li>Free plugin used on +250,000 sites</li>
28
  <li>Simple &amp; easy to use with clear instructions</li>
29
  <li>Automatically creates a snapshot on every plugin &amp; theme update</li>
30
  <li>Use it to quickly reset any data in WordPress</li>
@@ -35,3 +33,9 @@
35
  <p class="upsell-footer"><a class="button button-primary install-wpr">Install &amp; Activate WP Reset</a></p>
36
  </div>
37
  </div>
 
 
 
 
 
 
1
  <div class="wrap card" id="wp-reset-ad">
2
+ <h1>This plugin is being replaced by WP Reset</h1>
3
+ <a href="#" class="open-wpr-upsell"><img src="<?php echo plugins_url( 'assets/images/wp-reset-icon.png', DB_RESET_FILE ); ?>" alt="WP Reset - used on +300,000 sites" title="WP Reset - used on +300,000 sites"></a>
4
+ <p>We're phasing out support &amp; development for this plugin because we built the free <a href="#" class="open-wpr-upsell">WP Reset</a> plugin that has a lot more functions, automatic backups when you do resets and it is <b>used by over 300,000 sites</b> daily.<br><br><a href="#" class="open-wpr-upsell button button-primary">Install the free WP Reset plugin</a></p>
5
  </div>
6
 
7
  <div class="wrap card">
17
 
18
  </div>
19
 
 
 
 
20
 
21
  <div id="wpr-upsell-dialog" style="display: none;" title="WP Reset">
22
  <span class="ui-helper-hidden-accessible"><input type="text"/></span>
23
  <div style="padding: 20px; font-size: 15px;">
24
  <ul>
25
+ <li>Free plugin used on +300,000 sites</li>
26
  <li>Simple &amp; easy to use with clear instructions</li>
27
  <li>Automatically creates a snapshot on every plugin &amp; theme update</li>
28
  <li>Use it to quickly reset any data in WordPress</li>
33
  <p class="upsell-footer"><a class="button button-primary install-wpr">Install &amp; Activate WP Reset</a></p>
34
  </div>
35
  </div>
36
+
37
+ <div class="wrap card" id="wp-reset-ad">
38
+ <h1>This plugin is being replaced by WP Reset</h1>
39
+ <a href="#" class="open-wpr-upsell"><img src="<?php echo plugins_url( 'assets/images/wp-reset-icon.png', DB_RESET_FILE ); ?>" alt="WP Reset - used on +300,000 sites" title="WP Reset - used on +300,000 sites"></a>
40
+ <p>We're phasing out support &amp; development for this plugin because we built the free <a href="#" class="open-wpr-upsell">WP Reset</a> plugin that has a lot more functions, automatic backups when you do resets and it is <b>used by over 300,000 sites</b> daily.<br><br><a href="#" class="open-wpr-upsell button button-primary">Install the free WP Reset plugin</a></p>
41
+ </div>
wf-flyout/config.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $config = array();
3
+
4
+ $config['plugin_screen'] = 'tools_page_database-reset';
5
+ $config['icon_border'] = '1px solid #00000099';
6
+ $config['icon_right'] = '35px';
7
+ $config['icon_bottom'] = '35px';
8
+ $config['icon_image'] = 'db-reset.png';
9
+ $config['icon_padding'] = '8px';
10
+ $config['icon_size'] = '55px';
11
+ $config['menu_accent_color'] = '#dd3036';
12
+ $config['custom_css'] = '#wf-flyout .wff-menu-item .dashicons.dashicons-universal-access { font-size: 30px; padding: 0px 10px 0px 0; } #wf-flyout .ucp-icon .wff-icon img { max-width: 70%; } #wf-flyout .ucp-icon .wff-icon { line-height: 57px; }';
13
+
14
+ $config['menu_items'] = array(
15
+ array('href' => 'https://wpreset.com/?ref=wff-dbreset', 'target' => '_blank', 'label' => 'Get WP Reset PRO with 50% off', 'icon' => 'wp-reset.png'),
16
+ array('href' => 'https://underconstructionpage.com/?ref=wff-dbreset&coupon=welcome', 'target' => '_blank', 'label' => 'Create the perfect Under Construction Page', 'icon' => 'ucp.png', 'class' => 'ucp-icon'),
17
+ array('href' => 'https://wpsticky.com/?ref=wff-dbreset', 'target' => '_blank', 'label' => 'Make a menu sticky with WP Sticky', 'icon' => 'dashicons-admin-post'),
18
+ array('href' => 'https://wordpress.org/support/plugin/wordpress-database-reset/reviews/?filter=5#new-post', 'target' => '_blank', 'label' => 'Rate the Plugin', 'icon' => 'dashicons-thumbs-up'),
19
+ array('href' => 'https://wordpress.org/support/plugin/wordpress-database-reset/#new-post', 'target' => '_blank', 'label' => 'Get Support', 'icon' => 'dashicons-sos'),
20
+ );
wf-flyout/icons/db-reset.png ADDED
Binary file
wf-flyout/icons/ucp.png ADDED
Binary file
wf-flyout/icons/wp-reset.png ADDED
Binary file
wf-flyout/wf-flyout.css ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Universal fly-out menu for WebFactory plugins
3
+ * (c) WebFactory Ltd, 2021
4
+ */
5
+
6
+ #wf-flyout {
7
+ position: fixed;
8
+ z-index: 100049;
9
+ transition: all 0.3s ease-in-out;
10
+ right: 40px;
11
+ bottom: 40px;
12
+ opacity: 1;
13
+ }
14
+
15
+ #wff-overlay {
16
+ background: #000;
17
+ opacity: 0.4;
18
+ filter: alpha(opacity=40);
19
+ position: fixed;
20
+ top: 0;
21
+ right: 0;
22
+ bottom: 0;
23
+ left: 0;
24
+ display: none;
25
+ z-index: 100049;
26
+ }
27
+
28
+ #wf-flyout a:focus {
29
+ outline: none;
30
+ box-shadow: none;
31
+ }
32
+
33
+ #wf-flyout #wff-button {
34
+ display: block;
35
+ }
36
+
37
+ #wf-flyout #wff-image-wrapper {
38
+ border: 3px solid #000000;
39
+ border-radius: 50%;
40
+ padding: 0;
41
+ display: block;
42
+ overflow: hidden;
43
+ background: #ffffff;
44
+ box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
45
+ }
46
+
47
+ #wf-flyout #wff-button img {
48
+ width: 55px;
49
+ height: 55px;
50
+ display: block;
51
+ overflow: hidden;
52
+ padding: 2px;
53
+ background: #ffffff;
54
+ box-sizing: border-box;
55
+ }
56
+
57
+ #wf-flyout #wff-button:hover #wff-image-wrapper {
58
+ box-shadow: 0 3px 30px rgba(0, 0, 0, 0.25);
59
+ }
60
+
61
+ #wf-flyout:not(.opened) #wff-button:hover .wff-label {
62
+ opacity: 1;
63
+ margin-right: 0;
64
+ }
65
+
66
+ #wf-flyout .wff-label {
67
+ position: absolute;
68
+ display: block;
69
+ top: 50%;
70
+ right: calc(100% + 25px);
71
+ transform: translateY(-50%) scale(1);
72
+ -moz-transform: translateY(-50%);
73
+ -webkit-transform: translateY(-50%);
74
+ color: #fff;
75
+ background: #444 0 0 no-repeat padding-box;
76
+ font-size: 14px;
77
+ white-space: nowrap;
78
+ padding: 5px 10px;
79
+ height: auto !important;
80
+ line-height: initial;
81
+ transition: all 0.2s ease-out;
82
+ border-radius: 3px;
83
+ -moz-border-radius: 3px;
84
+ -webkit-border-radius: 3px;
85
+ opacity: 0;
86
+ margin-right: -50px;
87
+ }
88
+
89
+ #wf-flyout .wff-icon {
90
+ width: 40px;
91
+ height: 40px;
92
+ vertical-align: middle;
93
+ line-height: 60px;
94
+ text-align: center;
95
+ }
96
+
97
+ #wf-flyout .wff-icon img {
98
+ max-width: 80%;
99
+ filter: brightness(100);
100
+ }
101
+
102
+ #wf-flyout .wff-label.visible {
103
+ opacity: 1;
104
+ }
105
+
106
+ #wf-flyout .wff-menu-item {
107
+ position: absolute;
108
+ left: 10px;
109
+ width: 40px;
110
+ height: 40px;
111
+ opacity: 0;
112
+ visibility: hidden;
113
+ transform: scale(0);
114
+ border-radius: 50%;
115
+ box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
116
+ background: #0071a1;
117
+ text-align: center;
118
+ vertical-align: middle;
119
+ text-decoration: none;
120
+ transition-timing-function: ease-in-out;
121
+ }
122
+
123
+ #wf-flyout .wff-menu-item.accent {
124
+ background: #ca4a1f;
125
+ }
126
+
127
+ #wf-flyout.opened .wff-menu-item {
128
+ opacity: 1;
129
+ visibility: visible;
130
+ transform: scale(1);
131
+ }
132
+
133
+ #wf-flyout .wff-menu-item:hover {
134
+ box-shadow: 0 3px 30px rgba(0, 0, 0, 0.25);
135
+ }
136
+
137
+ #wf-flyout .wff-menu-item:hover .wff-label {
138
+ right: calc(100% + 55px);
139
+ }
140
+
141
+ #wf-flyout .wff-menu-item .wff-label {
142
+ right: calc(100% + 70px);
143
+ }
144
+
145
+ #wf-flyout .wff-menu-item .dashicons {
146
+ line-height: 41px;
147
+ font-size: 23px;
148
+ color: #fff;
149
+ padding: 0px 3px 0px 0;
150
+ }
151
+
152
+ .wff-menu-item-1 {
153
+ bottom: 75px;
154
+ transition: transform 0.2s 30ms, background-color 0.2s;
155
+ }
156
+
157
+ .wff-menu-item-2 {
158
+ bottom: 130px;
159
+ transition: transform 0.2s 70ms, background-color 0.2s;
160
+ }
161
+
162
+ .wff-menu-item-3 {
163
+ bottom: 185px;
164
+ transition: transform 0.2s 110ms, background-color 0.2s;
165
+ }
166
+
167
+ .wff-menu-item-4 {
168
+ bottom: 240px;
169
+ transition: transform 0.2s 150ms, background-color 0.2s;
170
+ }
171
+
172
+ .wff-menu-item-5 {
173
+ bottom: 295px;
174
+ transition: transform 0.2s 190ms, background-color 0.2s;
175
+ }
176
+
177
+ .wff-menu-item-6 {
178
+ bottom: 350px;
179
+ transition: transform 0.2s 230ms, background-color 0.2s;
180
+ }
181
+
182
+ .wff-menu-item-7 {
183
+ bottom: 405px;
184
+ transition: transform 0.2s 270ms, background-color 0.2s;
185
+ }
186
+
187
+ .wff-menu-item-8 {
188
+ bottom: 460px;
189
+ transition: transform 0.2s 310ms, background-color 0.2s;
190
+ }
191
+
192
+ .wff-menu-item-9 {
193
+ bottom: 515px;
194
+ transition: transform 0.2s 350ms, background-color 0.2s;
195
+ }
196
+
197
+ .wff-menu-item-10 {
198
+ bottom: 570px;
199
+ transition: transform 0.2s 390ms, background-color 0.2s;
200
+ }
wf-flyout/wf-flyout.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Universal fly-out menu for WebFactory plugins
3
+ * (c) WebFactory Ltd, 2021
4
+ */
5
+
6
+ jQuery(document).ready(function ($) {
7
+ $('#wff-button').on('click', function (e) {
8
+ e.preventDefault();
9
+
10
+ $('#wf-flyout').toggleClass('opened');
11
+ $('#wff-overlay').toggle();
12
+
13
+ return false;
14
+ }); // open/close menu
15
+
16
+ $('#wff-overlay').on('click', function (e) {
17
+ e.preventDefault();
18
+
19
+ $(this).hide();
20
+ $('#wf-flyout').removeClass('opened');
21
+
22
+ return false;
23
+ }); // click on overlay - hide menu
24
+ }); // jQuery ready
wf-flyout/wf-flyout.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Universal fly-out menu for WebFactory plugins
5
+ * (c) WebFactory Ltd, 2021
6
+ */
7
+
8
+
9
+ if (false == class_exists('wf_flyout')) {
10
+ class wf_flyout
11
+ {
12
+ var $ver = 1.0;
13
+ var $plugin_file = '';
14
+ var $plugin_slug = '';
15
+ var $config = array();
16
+
17
+
18
+ function __construct($plugin_file)
19
+ {
20
+ $this->plugin_file = $plugin_file;
21
+ $this->plugin_slug = basename(dirname($plugin_file));
22
+ $this->load_config();
23
+
24
+ if (!is_admin()) {
25
+ return;
26
+ } else {
27
+ add_action('admin_init', array($this, 'init'));
28
+ }
29
+ } // __construct
30
+
31
+
32
+ function load_config()
33
+ {
34
+ $config = array();
35
+ require_once plugin_dir_path($this->plugin_file) . 'wf-flyout/config.php';
36
+
37
+ $defaults = array(
38
+ 'plugin_screen' => '',
39
+ 'icon_border' => '#0000ff',
40
+ 'icon_right' => '40px',
41
+ 'icon_bottom' => '40px',
42
+ 'icon_image' => '',
43
+ 'icon_padding' => '2px',
44
+ 'icon_size' => '55px',
45
+ 'menu_accent_color' => '#ca4a1f',
46
+ 'custom_css' => '',
47
+ 'menu_items' => array(),
48
+ );
49
+
50
+ $config = array_merge($defaults, $config);
51
+ if (!is_array($config['plugin_screen'])) {
52
+ $config['plugin_screen'] = array($config['plugin_screen']);
53
+ }
54
+
55
+ $this->config = $config;
56
+ } // load_config
57
+
58
+
59
+ function is_plugin_screen()
60
+ {
61
+ $screen = get_current_screen();
62
+
63
+ if (in_array($screen->id, $this->config['plugin_screen'])) {
64
+ return true;
65
+ } else {
66
+ return false;
67
+ }
68
+ } // is_plugin_screen
69
+
70
+
71
+ function init()
72
+ {
73
+ add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
74
+ add_action('admin_head', array($this, 'admin_head'));
75
+ add_action('admin_footer', array($this, 'admin_footer'));
76
+ } // init
77
+
78
+
79
+ function admin_enqueue_scripts()
80
+ {
81
+ if (false === $this->is_plugin_screen()) {
82
+ return;
83
+ }
84
+
85
+ wp_enqueue_style('wf_flyout', plugin_dir_url($this->plugin_file) . 'wf-flyout/wf-flyout.css', array(), $this->ver);
86
+ wp_enqueue_script('wf_flyout', plugin_dir_url($this->plugin_file) . 'wf-flyout/wf-flyout.js', array(), $this->ver, true);;
87
+ } // admin_enqueue_scripts
88
+
89
+
90
+ function admin_head()
91
+ {
92
+ if (false === $this->is_plugin_screen()) {
93
+ return;
94
+ }
95
+
96
+ $out = '<style type="text/css">';
97
+ $out .= '#wf-flyout {
98
+ right: ' . $this->config['icon_right'] . ';
99
+ bottom: ' . $this->config['icon_bottom'] . ';
100
+ }';
101
+ $out .= '#wf-flyout #wff-image-wrapper {
102
+ border: ' . $this->config['icon_border'] . ';
103
+ }';
104
+ $out .= '#wf-flyout #wff-button img {
105
+ padding: ' . $this->config['icon_padding'] . ';
106
+ width: ' . $this->config['icon_size'] . ';
107
+ height: ' . $this->config['icon_size'] . ';
108
+ }';
109
+ $out .= '#wf-flyout .wff-menu-item.accent {
110
+ background: ' . $this->config['menu_accent_color'] . ';
111
+ }';
112
+ $out .= $this->config['custom_css'];
113
+ $out .= '</style>';
114
+
115
+ echo $out;
116
+ } // admin_head
117
+
118
+
119
+ function admin_footer()
120
+ {
121
+ if (false === $this->is_plugin_screen()) {
122
+ return;
123
+ }
124
+
125
+ $out = '';
126
+ $icons_url = plugin_dir_url($this->plugin_file) . 'wf-flyout/icons/';
127
+ $default_link_item = array('class' => '', 'href' => '#', 'target' => '_blank', 'label' => '', 'icon' => '');
128
+
129
+ $out .= '<div id="wff-overlay"></div>';
130
+
131
+ $out .= '<div id="wf-flyout">';
132
+
133
+ $out .= '<a href="#" id="wff-button">';
134
+ $out .= '<span class="wff-label">Open Quick Links</span>';
135
+ $out .= '<span id="wff-image-wrapper">';
136
+ $out .= '<img src="' . $icons_url . $this->config['icon_image'] . '" alt="Open Quick Links" title="Open Quick Links">';
137
+ $out .= '</span>';
138
+ $out .= '</a>';
139
+
140
+ $out .= '<div id="wff-menu">';
141
+ $i = 0;
142
+ foreach (array_reverse($this->config['menu_items']) as $item) {
143
+ $i++;
144
+ $item = array_merge($default_link_item, $item);
145
+
146
+ if (!empty($item['icon']) && substr($item['icon'], 0, 9) != 'dashicons') {
147
+ $item['class'] .= ' wff-custom-icon';
148
+ $item['class'] = trim($item['class']);
149
+ }
150
+
151
+ $out .= '<a href="' . $item['href'] . '" class="wff-menu-item wff-menu-item-' . $i . ' ' . $item['class'] . '" target="_blank">';
152
+ $out .= '<span class="wff-label visible">' . $item['label'] . '</span>';
153
+ if (substr($item['icon'], 0, 9) == 'dashicons') {
154
+ $out .= '<span class="dashicons ' . $item['icon'] . '"></span>';
155
+ } elseif (!empty($item['icon'])) {
156
+ $out .= '<span class="wff-icon"><img src="' . $icons_url . $item['icon'] . '"></span>';
157
+ }
158
+ $out .= '</a>';
159
+ } // foreach
160
+ $out .= '</div>'; // #wff-menu
161
+
162
+ $out .= '</div>'; // #wf-flyout
163
+
164
+ echo $out;
165
+ } // admin_footer
166
+ } // wf_flyout
167
+ } // if class exists
wp-reset.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: WP Database Reset
4
  Plugin URI: https://wordpress.org/plugins/wordpress-database-reset/
5
  Description: Reset all or some WP database tables back to their original state.
6
- Version: 3.17
7
  Author: WebFactory Ltd
8
  Author URI: https://www.webfactoryltd.com/
9
  License: GNU General Public License
10
  Text-domain: wordpress-database-reset
11
-
12
- Copyright 2011 - 2020 WebFactory Ltd (email: support@webfactoryltd.com)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License, version 2, as
@@ -25,7 +25,7 @@
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
28
- define( 'DB_RESET_VERSION', '3.17' );
29
  define( 'DB_RESET_PATH', dirname( __FILE__ ) );
30
  define( 'DB_RESET_NAME', basename( DB_RESET_PATH ) );
31
  define( 'DB_RESET_FILE', __FILE__ );
@@ -33,8 +33,8 @@ define( 'AUTOLOADER', DB_RESET_PATH . '/lib/class-plugin-autoloader.php' );
33
 
34
  require_once( DB_RESET_PATH . '/lib/helpers.php' );
35
 
36
- require_once 'wp301/wp301.php';
37
- new wf_wp301(__FILE__, 'tools_page_database-reset');
38
 
39
  register_activation_hook( __FILE__, 'db_reset_activate' );
40
 
3
  Plugin Name: WP Database Reset
4
  Plugin URI: https://wordpress.org/plugins/wordpress-database-reset/
5
  Description: Reset all or some WP database tables back to their original state.
6
+ Version: 3.18
7
  Author: WebFactory Ltd
8
  Author URI: https://www.webfactoryltd.com/
9
  License: GNU General Public License
10
  Text-domain: wordpress-database-reset
11
+
12
+ Copyright 2011 - 2021 WebFactory Ltd (email: support@webfactoryltd.com)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License, version 2, as
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
28
+ define( 'DB_RESET_VERSION', '3.18' );
29
  define( 'DB_RESET_PATH', dirname( __FILE__ ) );
30
  define( 'DB_RESET_NAME', basename( DB_RESET_PATH ) );
31
  define( 'DB_RESET_FILE', __FILE__ );
33
 
34
  require_once( DB_RESET_PATH . '/lib/helpers.php' );
35
 
36
+ require_once dirname(__FILE__) . '/wf-flyout/wf-flyout.php';
37
+ new wf_flyout(__FILE__);
38
 
39
  register_activation_hook( __FILE__, 'db_reset_activate' );
40
 
wp301/wp301-logo.png DELETED
Binary file
wp301/wp301.js DELETED
@@ -1,128 +0,0 @@
1
- /**
2
- * Campaign for WP 301 Redirects PRO
3
- * (c) WebFactory Ltd, 2020
4
- */
5
-
6
- jQuery(document).ready(function ($) {
7
- $('#wp301promo_dismiss').on('click', function (e) {
8
- e.preventDefault();
9
-
10
- var slug = $(this).data('plugin-slug');
11
-
12
- $.get({
13
- url: ajaxurl,
14
- data: {
15
- action: 'wp301_promo_dismiss',
16
- slug: slug,
17
- _ajax_nonce: wp301_promo.nonce_wp301_promo_dismiss,
18
- },
19
- })
20
- .always(function (data) {})
21
- .done(function (data) {
22
- if (data.success) {
23
- if (slug == 'dashboard') {
24
- $('#wp301promo_widget').hide();
25
- } else {
26
- $('#wp301-dialog').dialog('close');
27
- }
28
- } else {
29
- alert('Sorry, something is not right. Please reload the page and try again.');
30
- }
31
- })
32
- .fail(function (data) {
33
- alert('Sorry, something is not right. Please reload the page and try again.');
34
- });
35
- }); // dismiss
36
-
37
-
38
- $('#wp301promo_submit').on('click', function (e) {
39
- e.preventDefault();
40
-
41
- var btn = $('#wp301promo_submit');
42
- var name = $('#wp301promo_name').val();
43
- var email = $('#wp301promo_email').val();
44
- var plugin = $('#wp301promo_plugin').val();
45
- var position = $('#wp301promo_position').val();
46
- var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
47
-
48
- if (name.length < 2 || name.length > 128) {
49
- $('#wp301promo_name').focus();
50
- alert('Please enter your name. Thank you 👍');
51
- return false;
52
- }
53
- if (!regex.test(email) || email.lenght > 128) {
54
- $('#wp301promo_email').focus();
55
- alert('Please enter a valid email address. Thank you 👍');
56
- return false;
57
- }
58
-
59
- $(btn).addClass('disabled');
60
- $.get({
61
- url: ajaxurl,
62
- data: {
63
- action: 'wp301_promo_submit',
64
- _ajax_nonce: wp301_promo.nonce_wp301_promo_submit,
65
- name: name,
66
- email: email,
67
- position: position,
68
- plugin: plugin,
69
- },
70
- })
71
- .always(function (data) {
72
- $(btn).removeClass('disabled');
73
- })
74
- .done(function (data) {
75
- if (data.success) {
76
- alert(data.data);
77
-
78
- if (position == 'dashboard') {
79
- $('#wp301promo_widget').hide();
80
- } else {
81
- $('#wp301-dialog').dialog('close');
82
- }
83
- } else {
84
- alert(data.data);
85
- }
86
- })
87
- .fail(function (data) {
88
- alert('Sorry, something is not right. Please reload the page and try again.');
89
- });
90
- });
91
-
92
-
93
- $('#wp301promo_name, #wp301promo_email').on('keypress', function (e) {
94
- if (e.which == 13) {
95
- $('#wp301promo_submit').trigger('click');
96
- }
97
- }); // on enter
98
-
99
-
100
- if (wp301_promo.open_popup && $('#wp301-dialog').length == 1) {
101
- $('#wp301-dialog').dialog({
102
- dialogClass: 'wp-dialog wp301-dialog',
103
- modal: true,
104
- resizable: false,
105
- width: 550,
106
- height: 'auto',
107
- show: 'fade',
108
- hide: 'fade',
109
- close: function (event, ui) {},
110
- open: function (event, ui) {
111
- $(this)
112
- .siblings()
113
- .find('span.ui-dialog-title')
114
- .html('Get a WP 301 Redirects PRO license for FREE <del>$158</del>');
115
- wp301_fix_dialog_close(event, ui);
116
- },
117
- autoOpen: true,
118
- closeOnEscape: false,
119
- });
120
- } // open dialog
121
- }); // jQuery ready
122
-
123
-
124
- function wp301_fix_dialog_close(event, ui) {
125
- jQuery('.ui-widget-overlay').bind('click', function () {
126
- jQuery('#' + event.target.id).dialog('close');
127
- });
128
- } // wp301_fix_dialog_close
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp301/wp301.php DELETED
@@ -1,295 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Campaign for WP 301 Redirects PRO
5
- * (c) WebFactory Ltd, 2020
6
- */
7
-
8
-
9
- if (false == class_exists('wf_wp301')) {
10
- class wf_wp301
11
- {
12
- var $plugin_file = '';
13
- var $plugin_slug = '';
14
- var $plugin_screen = '';
15
- var $options = '';
16
- var $disable_dashboard = false;
17
-
18
-
19
- function __construct($plugin_file, $plugin_screen)
20
- {
21
- $this->plugin_file = $plugin_file;
22
- $this->plugin_slug = basename(dirname($plugin_file));
23
- $this->plugin_screen = $plugin_screen;
24
- $this->options = get_option('wp301promo', array());
25
-
26
- if (!is_admin() || !empty($this->options['email_submitted']) || date('Y-m-d') > '2020-11-05') {
27
- return;
28
- } else {
29
- add_action('admin_init', array($this, 'init'));
30
- }
31
- } // __construct
32
-
33
-
34
- function init()
35
- {
36
- add_action('wp_dashboard_setup', array($this, 'add_widget'));
37
- add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
38
- add_action('wp_ajax_wp301_promo_submit', array($this, 'ajax_submit'));
39
- add_action('wp_ajax_wp301_promo_dismiss', array($this, 'ajax_dismiss'));
40
- add_action('admin_footer', array($this, 'admin_footer'));
41
- } // init
42
-
43
-
44
- function admin_enqueue_scripts()
45
- {
46
- $screen = get_current_screen();
47
-
48
- if ($screen->base != 'dashboard' && $screen->id != $this->plugin_screen) {
49
- return;
50
- }
51
-
52
- if ($screen->base == 'dashboard' && (!empty($this->options['popup_dismissed_dashboard']) || !empty($this->disable_dashboard))) {
53
- return;
54
- }
55
-
56
- if ($screen->id == $this->plugin_screen) {
57
- wp_enqueue_style('wp-jquery-ui-dialog');
58
- wp_enqueue_script('jquery-ui-dialog');
59
- }
60
-
61
- wp_enqueue_script('wp301_promo', plugin_dir_url($this->plugin_file) . 'wp301/wp301.js');
62
-
63
- $js_vars = array(
64
- 'nonce_wp301_promo_submit' => wp_create_nonce('wp301_submit'),
65
- 'nonce_wp301_promo_dismiss' => wp_create_nonce('wp301_dismiss'),
66
- );
67
-
68
- if (empty($this->options['popup_dismissed_' . $this->plugin_slug])) {
69
- $js_vars['open_popup'] = true;
70
- }
71
-
72
- wp_localize_script('wp301_promo', 'wp301_promo', $js_vars);
73
- } // admin_enqueue_scripts
74
-
75
-
76
- function ajax_dismiss()
77
- {
78
- if (!wp_verify_nonce(@$_GET['_ajax_nonce'], 'wp301_dismiss')) {
79
- wp_send_json_error('Something is not right. Please reload the page and try again.');
80
- }
81
-
82
- $slug = substr(strip_tags(trim(@$_GET['slug'])), 0, 64);
83
-
84
- $this->options['popup_dismissed_' . $slug] = true;
85
- $tmp = update_option('wp301promo', $this->options);
86
-
87
- if ($tmp) {
88
- wp_send_json_success();
89
- } else {
90
- wp_send_json_error();
91
- }
92
- } // ajax_dismiss
93
-
94
-
95
- function ajax_submit()
96
- {
97
- if (!wp_verify_nonce(@$_GET['_ajax_nonce'], 'wp301_submit')) {
98
- wp_send_json_error('Something is not right. Please reload the page and try again.');
99
- }
100
-
101
- $email = strip_tags(trim(@$_GET['email']));
102
- $name = strip_tags(trim(@$_GET['name']));
103
- $plugin = strip_tags(trim(@$_GET['plugin'])) . '-' . strip_tags(trim(@$_GET['position']));
104
-
105
- if (!is_email($email)) {
106
- wp_send_json_error('Please enter a valid email address.');
107
- }
108
-
109
- $url = add_query_arg(array('name' => $name, 'email' => $email, 'plugin' => $plugin), 'https://wp301redirects.com/subscribe/');
110
-
111
- $response = wp_remote_get($url, array('timeout' => 25));
112
-
113
- if (is_wp_error($response)) {
114
- wp_send_json_error('Something is not right. Please reload the page and try again.');
115
- }
116
-
117
- $body = @json_decode(wp_remote_retrieve_body($response), true);
118
- if (empty($body['success'])) {
119
- wp_send_json_error('Something is not right. Please reload the page and try again.');
120
- }
121
-
122
- $this->options['email_submitted'] = true;
123
- update_option('wp301promo', $this->options);
124
- wp_send_json_success('Thank you for trusting us with your email! You\'ll hear from us soon 🚀');
125
- } // ajax_submit
126
-
127
-
128
- function add_widget()
129
- {
130
- if (!empty($this->options['popup_dismissed_dashboard']) || !empty($this->disable_dashboard)) {
131
- return;
132
- }
133
-
134
- add_meta_box('wp301promo_widget', 'Get a WP 301 Redirects PRO license for FREE <del>$158</del>', array($this, 'widget_content'), 'dashboard', 'side', 'high');
135
- } // add_widget
136
-
137
-
138
- function widget_content()
139
- {
140
- $out = '';
141
-
142
- $out .= '<style>';
143
- $out .= '#wp301promo_widget .disabled { pointer-events: none; }';
144
- $out .= '#wp301promo_widget label { font-weight: normal; display: inline-block; width: 15%; margin-bottom: 10px; }';
145
- $out .= '#wp301promo_widget input { width: 74%; margin-bottom: 10px; }';
146
- $out .= '#wp301promo_widget .button-primary { padding: 14px 28px; text-decoration: none; line-height: 1; }';
147
- $out .= '#wp301promo_dismiss { font-style: italic; display: inline-block; color: #444; text-decoration: none; margin: 8px 0 0 0; }';
148
- $out .= '#wp301promo_dismiss:hover { text-decoration: underline; }';
149
- $out .= '#wp301promo_widget, #wp301promo_widget p { font-size: 14px; }';
150
- $out .= '#wp301promo_widget .title301 { font-weight: 600; margin: 10px 0 -10px 0; }';
151
- $out .= '#wp301promo_widget img { max-width: 50%; max-height: 80px; }';
152
- $out .= '#wp301promo_widget .center { text-align: center; }';
153
- $out .= '#wp301promo_email { margin-bottom: 0 !important; }';
154
- $out .= '#wp301promo_widget { background-color: #fafafa; }';
155
- $out .= '#wp301promo_widget li a { text-decoration: underline; }';
156
- $out .= '#wp301promo_widget .wp301inside { padding: 25px 12px 0px 12px; position: relative; }';
157
- $out .= '#wp301promo_widget p { margin-top: 14px; line-height: 1.5; }';
158
- $out .= '#wp301promo_widget small { margin-left: 17%; }';
159
- $out .= '#wp301promo_widget ul { font-size: 14px; margin: 0 0 20px 0; list-style-type: disc; list-style-position: inside; }';
160
- $out .= '#wp301promo_widget li { margin-bottom: 3px; }';
161
- $out .= '#wp301promo_submit span { display: none; text-decoration: none; margin-right: 10px; animation: wf-spin-animation 1.5s infinite linear; }';
162
- $out .= '#wp301promo_submit.disabled span { display: inline-block; }';
163
- $out .= '@keyframes wf-spin-animation {
164
- from { transform: rotate(0deg); }
165
- to { transform: rotate(360deg); }
166
- }';
167
- $out .= '#wp301promo_widget .inside { overflow: hidden; margin: 0; }
168
- #wp301promo_widget .ribbon { margin: 0; padding: 11px 20px 10px 20px; background: #007cba; color: #FFF; font-weight: 800; position: absolute; top: -17px; right: -17px; transform: translateX(30%) translateY(0%) rotate(45deg); transform-origin: top left; letter-spacing: 1px; }
169
- #wp301promo_widget .ribbon:before, #wp301promo_widget .ribbon:after { content: ""; position: absolute; top:0; margin: 0 -1px; width: 100%; height: 100%; background: #007cba; }
170
- #wp301promo_widget .ribbon:before { right:100%; }
171
- #wp301promo_widget .ribbon:after { left:100%; }';
172
- $out .= '</style>';
173
-
174
- $plugin_url = plugin_dir_url($this->plugin_file);
175
-
176
- $out .= '<div class="ribbon">FREE</div>';
177
- $out .= '<div class="wp301inside">';
178
-
179
- $out .= '<div class="center"><a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-dashboard" target="_blank"><img src="' . $plugin_url . 'wp301/wp301-logo.png' . '" alt="WP 301 Redirects PRO" title="WP 301 Redirects PRO"></a></div>';
180
-
181
- $out .= '<p>On November 6th <a href="https://www.webfactoryltd.com/" target="_blank">WebFactory Ltd</a> will give away a limited number of lifetime WP 301 Redirect PRO licenses, <b>each for 10 sites</b>. A $158 retail value! 🚀 Leave your email, we\'ll send you a link &amp; download your copy.</p><p style="margin-bottom: 0;"><b>What do I get?</b></p>';
182
-
183
- $out .= '<ul>';
184
- $out .= '<li>Automatically fix 404 errors &amp; URL typos</li>';
185
- $out .= '<li>Create advanced redirect rules &amp; control affiliate links</li>';
186
- $out .= '<li>Detailed log of all redirects &amp; 404s</li>';
187
- $out .= '<li>Manage all sites\' licenses from a central Dashboard</li>';
188
- $out .= '<li>Lifetime license for 10 sites. <a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-dashboard" target="_blank">See all features</a></li>';
189
- $out .= '</ul>';
190
-
191
- $out .= '
192
- <div>
193
- <label for="wp301promo_name">Name:</label>
194
- <input type="text" name="wp301promo_name" id="wp301promo_name" placeholder="How shall we call you?"><br>
195
- <label for="wp301promo_email">Email:</label>
196
- <input type="text" name="wp301promo_email" id="wp301promo_email" placeholder="Your best email address to get the plugin"><br>
197
- <small>We hate spam as much as you do and never send it!</small>
198
- <input type="hidden" id="wp301promo_plugin" value="' . $this->plugin_slug . '">
199
- <input type="hidden" id="wp301promo_position" value="dashboard">
200
- </div>
201
-
202
- <p class="center">
203
- <a id="wp301promo_submit" class="button button-primary" href="#"><span class="dashicons dashicons-update"></span>I Want My FREE License <del>$158</del></a><br>
204
- <a id="wp301promo_dismiss" class="" href="#" data-plugin-slug="dashboard">I don\'t want a free license; don\'t show this again</a>
205
- </p>
206
- </div>';
207
-
208
- echo $out;
209
- } // widget_content
210
-
211
-
212
- function admin_footer()
213
- {
214
- $screen = get_current_screen();
215
- if ($screen->id != $this->plugin_screen) {
216
- return;
217
- }
218
-
219
- $out = '';
220
-
221
- $out .= '<style>';
222
- $out .= '#wp301promo_widget .disabled { pointer-events: none; }';
223
- $out .= '.wp301-dialog .ui-dialog-titlebar-close { visibility: hidden; }';
224
- $out .= '#wp301-dialog label { font-weight: normal; display: inline-block; width: 15%; margin-bottom: 10px; }';
225
- $out .= '#wp301-dialog input { width: 74%; margin-bottom: 10px; }';
226
- $out .= '#wp301-dialog .button-primary { padding: 14px 28px; text-decoration: none; line-height: 1; }';
227
- $out .= '#wp301-dialog, #wp301-dialog p { font-size: 14px; }';
228
- $out .= '#wp301-dialog .title301 { font-size: 1.3em; font-weight: 600; margin: 10px 0 -10px 0; }';
229
- $out .= '#wp301-dialog img { max-width: 60%; }';
230
- $out .= '#wp301-dialog li a { text-decoration: underline; }';
231
- $out .= '#wp301-dialog small { margin-left: 16%; }';
232
- $out .= '#wp301-dialog .center { text-align: center; }';
233
- $out .= '#wp301-dialog, .wp301-dialog .ui-dialog-titlebar { background-color: #fafafa; }';
234
- $out .= '#wp301-dialog .wp301inside { padding: 12px 12px 0px 12px; }';
235
- $out .= '#wp301-dialog p { margin-top: 14px; line-height: 1.5; }';
236
- $out .= '#wp301-dialog ul { margin: 0 0 20px 0; list-style-type: disc; list-style-position: inside; }';
237
- $out .= '#wp301-dialog li { margin-bottom: 3px; }';
238
- $out .= '#wp301promo_dismiss { display: inline-block; color: #444; text-decoration: none; margin: 8px 0 0 0; }';
239
- $out .= '#wp301promo_dismiss:hover { text-decoration: underline; }';
240
- $out .= '#wp301promo_submit span { display: none; text-decoration: none; margin-right: 10px; animation: wf-spin-animation 1.5s infinite linear; }';
241
- $out .= '#wp301promo_submit.disabled span { display: inline-block; }';
242
- $out .= '@keyframes wf-spin-animation {
243
- from { transform: rotate(0deg); }
244
- to { transform: rotate(360deg); }
245
- }';
246
- $out .= '#wp301-dialog .inside { overflow: hidden; margin: 0; }
247
- #wp301-dialog .ribbon { margin: 0; padding: 11px 20px 10px 20px; background: #007cba; color: #FFF; font-weight: 800; position: absolute; top: -17px; right: -17px; transform: translateX(30%) translateY(0%) rotate(45deg); transform-origin: top left; letter-spacing: 1px; }
248
- #wp301-dialog .ribbon:before, #wp301-dialog .ribbon:after { content: ""; position: absolute; top:0; margin: 0 -1px; width: 100%; height: 100%; background: #007cba; }
249
- #wp301-dialog .ribbon:before { right:100%; }
250
- #wp301-dialog .ribbon:after { left:100%; }';
251
- $out .= '</style>';
252
-
253
- $out .= '<div id="wp301-dialog" style="display: none;" title="Get a WP 301 Redirects PRO license for FREE"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
254
-
255
- $plugin_url = plugin_dir_url($this->plugin_file);
256
-
257
- $out .= '<div class="wp301inside">';
258
- $out .= '<div class="ribbon">FREE</div>';
259
-
260
- $out .= '<div class="center"><a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-popup" target="_blank"><img src="' . $plugin_url . 'wp301/wp301-logo.png' . '" alt="WP 301 Redirects PRO" title="WP 301 Redirects PRO"></a></div>';
261
-
262
- $out .= '<p>On November 6th <a href="https://www.webfactoryltd.com/" target="_blank">WebFactory Ltd</a> will give away a limited number of lifetime WP 301 Redirect PRO licenses, <b>each for 10 sites</b>. A $158 retail value! 🚀 Leave your email, we\'ll send you a link &amp; download your copy.</p><p style="margin-bottom: 0;"><b>What do I get?</b></p>';
263
-
264
- $out .= '<ul>';
265
- $out .= '<li>Automatically fix 404 errors &amp; URL typos</li>';
266
- $out .= '<li>Create advanced redirect rules &amp; control affiliate links</li>';
267
- $out .= '<li>Detailed log of all redirects &amp; 404s</li>';
268
- $out .= '<li>Manage all sites\' licenses from a central Dashboard</li>';
269
- $out .= '<li>Lifetime license for 10 sites. <a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-dashboard" target="_blank">See all features</a></li>';
270
- $out .= '</ul>';
271
-
272
- $out .= '
273
- <div>
274
- <label for="wp301promo_name">Name:</label>
275
- <input type="text" name="wp301promo_name" id="wp301promo_name" placeholder="How shall we call you?"><br>
276
- <label for="wp301promo_email">Email:</label>
277
- <input type="text" name="wp301promo_email" id="wp301promo_email" placeholder="Your best email address to get the plugin"><br>
278
- <small>We hate spam as much as you do and never send it!</small>
279
- <input type="hidden" id="wp301promo_plugin" value="' . $this->plugin_slug . '">
280
- <input type="hidden" id="wp301promo_position" value="popup">
281
- </div>
282
-
283
- <p class="center">
284
- <a id="wp301promo_submit" class="button button-primary" href="#"><span class="dashicons dashicons-update"></span>I Want My FREE License <del>$158</del></a><br>
285
- <a id="wp301promo_dismiss" class="" href="#" data-plugin-slug="' . $this->plugin_slug . '">I don\'t want a free license; don\'t show this again</a>
286
- </p>
287
-
288
- </div>';
289
-
290
- $out .= '</div>';
291
-
292
- echo $out;
293
- } // wp_footer
294
- } // wf_wp301
295
- }