WP Migrate DB - Version 0.4.2

Version Description

  • 2012-09-13 =
  • Moved screenshots to /assets folder and updated them to support retina
  • Added sidebar including author profile and survey to gauge interest for a pro version
Download this release

Release Info

Developer bradt
Plugin Icon 128x128 WP Migrate DB
Version 0.4.2
Comparing to
See all releases

Code changes from version 0.4.1 to 0.4.2

asset/config.rb ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Require any additional compass plugins here.
2
+
3
+ # Set this to the root of your project when deployed:
4
+ http_path = "/"
5
+ css_dir = "css"
6
+ sass_dir = "sass"
7
+ images_dir = "img"
8
+ javascripts_dir = "js"
9
+
10
+ # You can select your preferred output style here (can be overridden via the command line):
11
+ # output_style = :expanded or :nested or :compact or :compressed
12
+
13
+ # To enable relative paths to assets via compass helper functions. Uncomment:
14
+ # relative_assets = true
15
+
16
+ # To disable debugging comments that display the original location of your selectors. Uncomment:
17
+ # line_comments = false
18
+
19
+
20
+ # If you prefer the indented syntax, you might want to regenerate this
21
+ # project again passing --syntax sass, or you can uncomment this:
22
+ # preferred_syntax = :sass
23
+ # and then run:
24
+ # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
asset/css/styles.css ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* line 1, ../sass/styles.scss */
2
+ #migrate-form {
3
+ padding-top: 10px;
4
+ }
5
+
6
+ /* line 9, ../sass/styles.scss */
7
+ .form-table .row-new-url th, .form-table .row-new-url td,
8
+ .form-table .row-new-path th,
9
+ .form-table .row-new-path td,
10
+ .form-table .row-revisions th,
11
+ .form-table .row-revisions td {
12
+ padding-bottom: 20px;
13
+ border-bottom: 1px solid #ccc;
14
+ }
15
+ /* line 18, ../sass/styles.scss */
16
+ .form-table .row-old-path th, .form-table .row-old-path td,
17
+ .form-table .row-save-file th,
18
+ .form-table .row-save-file td,
19
+ .form-table .row-guids th,
20
+ .form-table .row-guids td {
21
+ padding-top: 20px;
22
+ }
23
+
24
+ /* line 24, ../sass/styles.scss */
25
+ p.submit {
26
+ overflow: hidden;
27
+ padding-top: 20px;
28
+ border-top: 1px solid #ccc;
29
+ margin-top: 20px;
30
+ }
31
+ /* line 30, ../sass/styles.scss */
32
+ p.submit input {
33
+ float: left;
34
+ }
35
+ /* line 34, ../sass/styles.scss */
36
+ p.submit img {
37
+ float: left;
38
+ margin: 3px 0 0 5px;
39
+ }
40
+
41
+ /* line 40, ../sass/styles.scss */
42
+ #wpmdb-container {
43
+ position: relative;
44
+ }
45
+
46
+ /* line 44, ../sass/styles.scss */
47
+ #wpmdb-main {
48
+ margin-right: 320px;
49
+ min-height: 1200px;
50
+ }
51
+
52
+ /* line 49, ../sass/styles.scss */
53
+ #wpmdb-sidebar {
54
+ position: absolute;
55
+ top: 0;
56
+ right: 0;
57
+ width: 250px;
58
+ border: 1px solid #ccc;
59
+ padding: 20px;
60
+ }
61
+ /* line 57, ../sass/styles.scss */
62
+ #wpmdb-sidebar .author {
63
+ padding-bottom: 20px;
64
+ margin-bottom: 20px;
65
+ border-bottom: 1px solid #ccc;
66
+ overflow: hidden;
67
+ }
68
+ /* line 63, ../sass/styles.scss */
69
+ #wpmdb-sidebar .author img {
70
+ float: left;
71
+ margin-right: 20px;
72
+ }
73
+ /* line 68, ../sass/styles.scss */
74
+ #wpmdb-sidebar .author .desc {
75
+ float: left;
76
+ }
77
+ /* line 72, ../sass/styles.scss */
78
+ #wpmdb-sidebar .author h3 {
79
+ font-size: 12px;
80
+ margin: 0;
81
+ }
82
+ /* line 77, ../sass/styles.scss */
83
+ #wpmdb-sidebar .author h2 {
84
+ font-size: 18px;
85
+ margin: 0;
86
+ padding: 0;
87
+ }
88
+ /* line 82, ../sass/styles.scss */
89
+ #wpmdb-sidebar .author h2 a {
90
+ color: #464646;
91
+ text-decoration: none;
92
+ }
93
+ /* line 86, ../sass/styles.scss */
94
+ #wpmdb-sidebar .author h2 a:hover {
95
+ color: #000;
96
+ }
97
+ /* line 92, ../sass/styles.scss */
98
+ #wpmdb-sidebar .author p {
99
+ margin: 0;
100
+ }
101
+ /* line 97, ../sass/styles.scss */
102
+ #wpmdb-sidebar .poll {
103
+ padding-bottom: 20px;
104
+ margin-bottom: 20px;
105
+ border-bottom: 1px solid #ccc;
106
+ }
107
+ /* line 102, ../sass/styles.scss */
108
+ #wpmdb-sidebar .poll h2 {
109
+ padding: 0;
110
+ margin: 0;
111
+ margin-bottom: 0.5em;
112
+ color: #666;
113
+ font-size: 20px;
114
+ }
115
+ /* line 110, ../sass/styles.scss */
116
+ #wpmdb-sidebar .poll ul {
117
+ list-style-type: disc;
118
+ }
119
+ /* line 114, ../sass/styles.scss */
120
+ #wpmdb-sidebar .poll li {
121
+ margin-left: 1.5em;
122
+ color: #666;
123
+ }
124
+ /* line 119, ../sass/styles.scss */
125
+ #wpmdb-sidebar .poll p {
126
+ margin: 0;
127
+ }
128
+ /* line 123, ../sass/styles.scss */
129
+ #wpmdb-sidebar .poll .error {
130
+ color: red;
131
+ font-weight: bold;
132
+ margin-bottom: 1em;
133
+ }
134
+ /* line 129, ../sass/styles.scss */
135
+ #wpmdb-sidebar .poll .thanks {
136
+ color: #333;
137
+ }
138
+ /* line 133, ../sass/styles.scss */
139
+ #wpmdb-sidebar .poll .field {
140
+ margin-bottom: 1em;
141
+ }
142
+ /* line 136, ../sass/styles.scss */
143
+ #wpmdb-sidebar .poll .field p {
144
+ margin-bottom: 0.3em;
145
+ }
146
+ /* line 140, ../sass/styles.scss */
147
+ #wpmdb-sidebar .poll .field .willing-copy {
148
+ font-weight: bold;
149
+ font-size: 14px;
150
+ line-height: 1.4em;
151
+ margin-bottom: 1em;
152
+ }
153
+ /* line 148, ../sass/styles.scss */
154
+ #wpmdb-sidebar .poll .field.how-much input {
155
+ width: 50px;
156
+ }
157
+ /* line 154, ../sass/styles.scss */
158
+ #wpmdb-sidebar .poll .field.notify-me input {
159
+ position: absolute;
160
+ }
161
+ /* line 158, ../sass/styles.scss */
162
+ #wpmdb-sidebar .poll .field.notify-me label {
163
+ display: block;
164
+ padding-left: 20px;
165
+ }
166
+ /* line 166, ../sass/styles.scss */
167
+ #wpmdb-sidebar .poll .field.comments textarea {
168
+ width: 230px;
169
+ height: 3em;
170
+ }
171
+ /* line 171, ../sass/styles.scss */
172
+ #wpmdb-sidebar .poll .field.comments textarea.has-content, #wpmdb-sidebar .poll .field.comments textarea:focus {
173
+ height: 5em;
174
+ }
asset/img/wpappstore-logo.png ADDED
Binary file
asset/js/script.js ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($) {
2
+ $(document).ready(function() {
3
+ $('#replace-guids-info-link').click(function() {
4
+ var $div = $('#replace-guids-info');
5
+ if ( 'none' == $div.css('display') ) {
6
+ $div.show();
7
+ $(this).html('show less');
8
+ return false;
9
+ }
10
+ else {
11
+ $div.hide();
12
+ $(this).html('show more');
13
+ return false;
14
+ }
15
+ });
16
+
17
+ $('#wpmdb-sidebar').each(function() {
18
+ var $sidebar = $(this);
19
+
20
+ $('form', $sidebar).submit(function() {
21
+ if (!$('input[name=notify-me]', $sidebar).attr('checked')) {
22
+ $('input[name=notify-email]', $sidebar).val('');
23
+ }
24
+
25
+ var $form = $(this),
26
+ data = $(this).serializeArray();
27
+
28
+ data.push({name: 'action', value: 'poll_submission'});
29
+
30
+ $.post( ajaxurl, data, function(result) {
31
+ if (result) {
32
+ $('.error', $sidebar).remove();
33
+ $('.field.submit-button', $sidebar).before('<p class="error" style="display: none;">' + result + '</p>');
34
+ $('.error', $sidebar).fadeIn();
35
+ }
36
+ else {
37
+ $form.html('<p class="thanks">Thanks for your input.</p>').fadeIn();
38
+ document.location.hash = '#top';
39
+ }
40
+ });
41
+ return false;
42
+ });
43
+
44
+ $('input[name=willing-pay]', $sidebar).change(function() {
45
+ var $yes_questions = $('.yes-questions', $sidebar);
46
+ if ('Yes' == $(this).val()) {
47
+ $yes_questions.show();
48
+ }
49
+ else {
50
+ $yes_questions.hide();
51
+ }
52
+
53
+ $('.field.comments', $sidebar).show();
54
+ });
55
+
56
+ $('input[name=notify-me]', $sidebar).click(function() {
57
+ var $notify_email = $('.notify-email', $sidebar);
58
+ if ($(this).attr('checked')) {
59
+ $notify_email.show();
60
+ }
61
+ else {
62
+ $notify_email.hide();
63
+ }
64
+ });
65
+
66
+ $('.field.comments textarea', $sidebar).blur(function() {
67
+ if ($(this).val()) {
68
+ $(this).addClass('has-content');
69
+ }
70
+ else {
71
+ $(this).removeClass('has-content');
72
+ }
73
+ })
74
+ });
75
+ });
76
+
77
+ var admin_url = ajaxurl.replace( '/admin-ajax.php', '' ),
78
+ spinner_url = admin_url + '/images/wpspin_light.gif';
79
+
80
+ var spinner = new Image();
81
+ spinner.src = spinner_url;
82
+
83
+ $('#migrate-form').submit(function() {
84
+ $('p.submit', this).append('<img src="' + spinner_url + '" alt="" />');
85
+ });
86
+ })(jQuery);
asset/sass/styles.scss ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #migrate-form {
2
+ padding-top: 10px;
3
+ }
4
+
5
+ .form-table {
6
+ .row-new-url,
7
+ .row-new-path,
8
+ .row-revisions {
9
+ th, td {
10
+ padding-bottom: 20px;
11
+ border-bottom: 1px solid #ccc;
12
+ }
13
+ }
14
+
15
+ .row-old-path,
16
+ .row-save-file,
17
+ .row-guids {
18
+ th, td {
19
+ padding-top: 20px;
20
+ }
21
+ }
22
+ }
23
+
24
+ p.submit {
25
+ overflow: hidden;
26
+ padding-top: 20px;
27
+ border-top: 1px solid #ccc;
28
+ margin-top: 20px;
29
+
30
+ input {
31
+ float: left;
32
+ }
33
+
34
+ img {
35
+ float: left;
36
+ margin: 3px 0 0 5px;
37
+ }
38
+ }
39
+
40
+ #wpmdb-container {
41
+ position: relative;
42
+ }
43
+
44
+ #wpmdb-main {
45
+ margin-right: 320px;
46
+ min-height: 1200px;
47
+ }
48
+
49
+ #wpmdb-sidebar {
50
+ position: absolute;
51
+ top: 0;
52
+ right: 0;
53
+ width: 250px;
54
+ border: 1px solid #ccc;
55
+ padding: 20px;
56
+
57
+ .author {
58
+ padding-bottom: 20px;
59
+ margin-bottom: 20px;
60
+ border-bottom: 1px solid #ccc;
61
+ overflow: hidden;
62
+
63
+ img {
64
+ float: left;
65
+ margin-right: 20px;
66
+ }
67
+
68
+ .desc {
69
+ float: left;
70
+ }
71
+
72
+ h3 {
73
+ font-size: 12px;
74
+ margin: 0;
75
+ }
76
+
77
+ h2 {
78
+ font-size: 18px;
79
+ margin: 0;
80
+ padding: 0;
81
+
82
+ a {
83
+ color: #464646;
84
+ text-decoration: none;
85
+
86
+ &:hover {
87
+ color: #000;
88
+ }
89
+ }
90
+ }
91
+
92
+ p {
93
+ margin: 0;
94
+ }
95
+ }
96
+
97
+ .poll {
98
+ padding-bottom: 20px;
99
+ margin-bottom: 20px;
100
+ border-bottom: 1px solid #ccc;
101
+
102
+ h2 {
103
+ padding: 0;
104
+ margin: 0;
105
+ margin-bottom: 0.5em;
106
+ color: #666;
107
+ font-size: 20px;
108
+ }
109
+
110
+ ul {
111
+ list-style-type: disc;
112
+ }
113
+
114
+ li {
115
+ margin-left: 1.5em;
116
+ color: #666;
117
+ }
118
+
119
+ p {
120
+ margin: 0;
121
+ }
122
+
123
+ .error {
124
+ color: red;
125
+ font-weight: bold;
126
+ margin-bottom: 1em;
127
+ }
128
+
129
+ .thanks {
130
+ color: #333;
131
+ }
132
+
133
+ .field {
134
+ margin-bottom: 1em;
135
+
136
+ p {
137
+ margin-bottom: 0.3em;
138
+ }
139
+
140
+ .willing-copy {
141
+ font-weight: bold;
142
+ font-size: 14px;
143
+ line-height: 1.4em;
144
+ margin-bottom: 1em;
145
+ }
146
+
147
+ &.how-much {
148
+ input {
149
+ width: 50px;
150
+ }
151
+ }
152
+
153
+ &.notify-me {
154
+ input {
155
+ position: absolute;
156
+ }
157
+
158
+ label {
159
+ display: block;
160
+ padding-left: 20px;
161
+ }
162
+
163
+ }
164
+
165
+ &.comments {
166
+ textarea {
167
+ width: 230px;
168
+ height: 3em;
169
+
170
+ &.has-content,
171
+ &:focus {
172
+ height: 5em;
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: bradt
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5VPMGLLK94XJC
4
  Tags: database, migrate, backup, mysql
5
  Requires at least: 2.0.3
6
- Tested up to: 3.4.1
7
- Stable tag: 0.4.1
8
  License: GPLv2
9
 
10
  Exports your database, does a find and replace on URLs and file paths, then allows you to save it to your computer.
@@ -29,6 +29,10 @@ Example: <code>s:5:"hello"</code> becomes <code>s:11:"hello world"</code>
29
 
30
  == Changelog ==
31
 
 
 
 
 
32
  = 0.4.1 - 2012-08-15 =
33
  * Removed WP App Store installer - not allowed in WP.org repo
34
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5VPMGLLK94XJC
4
  Tags: database, migrate, backup, mysql
5
  Requires at least: 2.0.3
6
+ Tested up to: 3.4.2
7
+ Stable tag: 0.4.2
8
  License: GPLv2
9
 
10
  Exports your database, does a find and replace on URLs and file paths, then allows you to save it to your computer.
29
 
30
  == Changelog ==
31
 
32
+ = 0.4.2 - 2012-09-13 =
33
+ * Moved screenshots to /assets folder and updated them to support retina
34
+ * Added sidebar including author profile and survey to gauge interest for a pro version
35
+
36
  = 0.4.1 - 2012-08-15 =
37
  * Removed WP App Store installer - not allowed in WP.org repo
38
 
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
script.js DELETED
@@ -1,27 +0,0 @@
1
- (function($) {
2
- $(document).ready(function() {
3
- $('#replace-guids-info-link').click(function() {
4
- var $div = $('#replace-guids-info');
5
- if ( 'none' == $div.css('display') ) {
6
- $div.show();
7
- $(this).html('show less');
8
- return false;
9
- }
10
- else {
11
- $div.hide();
12
- $(this).html('show more');
13
- return false;
14
- }
15
- });
16
- });
17
-
18
- var admin_url = ajaxurl.replace( '/admin-ajax.php', '' ),
19
- spinner_url = admin_url + '/images/wpspin_light.gif';
20
-
21
- var spinner = new Image();
22
- spinner.src = spinner_url;
23
-
24
- $('#migrate-form').submit(function() {
25
- $('p.submit', this).append('<img src="' + spinner_url + '" alt="" />');
26
- });
27
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
styles.css DELETED
@@ -1,38 +0,0 @@
1
- #migrate-form {
2
- padding-top: 10px;
3
- }
4
-
5
- .form-table .row-new-url th,
6
- .form-table .row-new-url td,
7
- .form-table .row-new-path th,
8
- .form-table .row-new-path td,
9
- .form-table .row-revisions th,
10
- .form-table .row-revisions td {
11
- padding-bottom: 20px;
12
- border-bottom: 1px solid #ccc;
13
- }
14
-
15
- .form-table .row-old-path th,
16
- .form-table .row-old-path td,
17
- .form-table .row-save-file th,
18
- .form-table .row-save-file td,
19
- .form-table .row-guids th,
20
- .form-table .row-guids td {
21
- padding-top: 20px;
22
- }
23
-
24
- p.submit {
25
- overflow: hidden;
26
- padding-top: 20px;
27
- border-top: 1px solid #ccc;
28
- margin-top: 20px;
29
- }
30
-
31
- p.submit input {
32
- float: left;
33
- }
34
-
35
- p.submit img {
36
- float: left;
37
- margin: 3px 0 0 5px;
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp-migrate-db.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP-Migrate-DB
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-migrate-db/
5
  Description: Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.
6
  Author: Brad Touesnard
7
- Version: 0.4.1
8
  Author URI: http://bradt.ca/
9
  */
10
 
@@ -58,10 +58,27 @@ class WP_Migrate_DB {
58
  $this->replaced['nonserialized']['count'] = 0;
59
 
60
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
 
61
 
62
  $this->handle_request();
63
  }
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  function handle_request() {
66
  if ( !isset( $_GET['page'] ) || 'wp-migrate-db' != $_GET['page'] )
67
  return;
@@ -122,6 +139,10 @@ class WP_Migrate_DB {
122
  <div class="wrap">
123
  <div id="icon-tools" class="icon32"><br /></div><h2>WP Migrate DB</h2>
124
 
 
 
 
 
125
  <?php
126
  if (isset($_POST['Submit'])) {
127
  if (empty($this->errors)) {
@@ -328,9 +349,98 @@ class WP_Migrate_DB {
328
  <input class="button" type="submit" value="Export Database" name="Submit"/>
329
  </p>
330
  </form>
 
331
  <?php
332
  }
333
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  </div>
335
  <?php
336
  }
@@ -681,9 +791,9 @@ class WP_Migrate_DB {
681
  add_management_page('WP Migrate DB','WP Migrate DB','update_core','wp-migrate-db',array($this, 'options_page'));
682
  }
683
 
684
- $src = plugins_url( 'styles.css', __FILE__ );
685
  wp_enqueue_style( 'wp-migrate-db-styles', $src );
686
- $src = plugins_url( 'script.js', __FILE__ );
687
  wp_enqueue_script( 'wp-migrate-db-script', $src, array( 'jquery' ), false, true );
688
  }
689
 
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-migrate-db/
5
  Description: Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.
6
  Author: Brad Touesnard
7
+ Version: 0.4.2
8
  Author URI: http://bradt.ca/
9
  */
10
 
58
  $this->replaced['nonserialized']['count'] = 0;
59
 
60
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
61
+ add_action( 'wp_ajax_poll_submission', array( $this, 'poll_submission' ) );
62
 
63
  $this->handle_request();
64
  }
65
 
66
+ function poll_submission() {
67
+ $response = wp_remote_post( 'http://bradt.ca/wpmdb-poll.php', array(
68
+ 'timeout' => 60,
69
+ 'body' => $_POST
70
+ ));
71
+
72
+ if ( is_wp_error( $response ) ) {
73
+ echo "Error attempting to save your submission.";
74
+ }
75
+ else {
76
+ echo $response['body'];
77
+ }
78
+
79
+ die(); // this is required to return a proper result
80
+ }
81
+
82
  function handle_request() {
83
  if ( !isset( $_GET['page'] ) || 'wp-migrate-db' != $_GET['page'] )
84
  return;
139
  <div class="wrap">
140
  <div id="icon-tools" class="icon32"><br /></div><h2>WP Migrate DB</h2>
141
 
142
+ <div id="wpmdb-container">
143
+
144
+ <div id="wpmdb-main">
145
+
146
  <?php
147
  if (isset($_POST['Submit'])) {
148
  if (empty($this->errors)) {
349
  <input class="button" type="submit" value="Export Database" name="Submit"/>
350
  </p>
351
  </form>
352
+
353
  <?php
354
  }
355
  ?>
356
+ </div>
357
+
358
+ <div id="wpmdb-sidebar">
359
+
360
+ <div class="author">
361
+ <img src="http://www.gravatar.com/avatar/e538ca4cb34839d4e5e3ccf20c37c67b?s=128&amp;d" width="64" height="64" />
362
+ <div class="desc">
363
+ <h3>Created &amp; maintained by</h3>
364
+ <h2>Brad Touesnard</h2>
365
+ <p>
366
+ <a href="http://profiles.wordpress.org/bradt/">Profile</a>
367
+ &nbsp;&nbsp;
368
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=5VPMGLLK94XJC">Donate</a>
369
+ </p>
370
+ </div>
371
+ </div>
372
+
373
+ <form method="post" action="http://bradt.ca/wpmdb-poll.php" class="poll">
374
+ <h2>PRO Version?</h2>
375
+ <p>
376
+ What if there was a PRO version of this plugin that included the following?
377
+ </p>
378
+
379
+ <ul>
380
+ <li>
381
+ One click to transmit the data to the migrated
382
+ site and import it. No downloading, no uploading,
383
+ no command line, no phpMyAdmin.
384
+ </li>
385
+ <li>
386
+ Automatically keep your local dev database
387
+ in-sync with the live production database.
388
+ <li>
389
+ 1 year of updates and priority email support.
390
+ </li>
391
+ </ul>
392
+
393
+ <div class="field">
394
+ <p class="willing-copy">Is that something you'd be willing to pay for?</p>
395
+ <label><input type="radio" name="willing-pay" value="Yes" /> Yes</label>
396
+ &nbsp;&nbsp;&nbsp;&nbsp;
397
+ <label><input type="radio" name="willing-pay" value="No" /> No</label>
398
+ </div>
399
+
400
+ <div class="yes-questions" style="display: none;">
401
+
402
+ <div class="field how-much">
403
+ <p>How much would you pay?</p>
404
+ $ <input type="text" name="how-much" /> USD
405
+ </div>
406
+
407
+ <div class="field notify-me">
408
+ <input type="checkbox" name="notify-me" value="Yes" id="notify-me" />
409
+ <label for="notify-me">
410
+ Send me an email if this thing ever gets off the ground.
411
+ </label>
412
+ </div>
413
+
414
+ <div class="field notify-email" style="display: none;">
415
+ <p>Your Email</p>
416
+ <?php $user = wp_get_current_user(); ?>
417
+ <input type="email" name="notify-email" value="<?php echo esc_attr( $user->user_email ); ?>" />
418
+ </div>
419
+
420
+ </div>
421
+
422
+ <div class="field comments" style="display: none;">
423
+ <p>Comments (optional)</p>
424
+ <textarea name="comments"></textarea>
425
+ </div>
426
+
427
+ <div class="field submit-button">
428
+ <input type="submit" class="button" value="Submit" />
429
+ </div>
430
+ </form>
431
+
432
+ <?php $url = 'http://wpappstore.com/?utm_source=plugin&amp;utm_medium=wordpress&amp;utm_campaign=wpmigratedb'; ?>
433
+ <div class="wpas-promo">
434
+ <a href="<?php echo $url; ?>"><img src="<?php echo plugins_url( 'asset/img/wpappstore-logo.png', __FILE__ ); ?>" alt="WP App Store" width="220" /></a>
435
+ <p>
436
+ Purchase &amp; install themes and plugins from top brands directly from your WordPress dashboard.
437
+ <a href="<?php echo $url; ?>">Check&nbsp;it&nbsp;out&nbsp;&raquo;</a>
438
+ </p>
439
+ </div>
440
+
441
+ </div>
442
+
443
+ </div>
444
  </div>
445
  <?php
446
  }
791
  add_management_page('WP Migrate DB','WP Migrate DB','update_core','wp-migrate-db',array($this, 'options_page'));
792
  }
793
 
794
+ $src = plugins_url( 'asset/css/styles.css', __FILE__ );
795
  wp_enqueue_style( 'wp-migrate-db-styles', $src );
796
+ $src = plugins_url( 'asset/js/script.js', __FILE__ );
797
  wp_enqueue_script( 'wp-migrate-db-script', $src, array( 'jquery' ), false, true );
798
  }
799