Velvet Blues Update URLs - Version 3.2.2

Version Description

  • Relocated Update URLs tab to Tools section. It is now found under Tools->Update URLs
  • Added additional serialization checks for postmeta.
Download this release

Release Info

Developer VelvetBlues.com
Plugin Icon wp plugin Velvet Blues Update URLs
Version 3.2.2
Comparing to
See all releases

Code changes from version 3.2.1 to 3.2.2

Files changed (2) hide show
  1. readme.txt +8 -4
  2. velvet-blues-update-urls.php +199 -47
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Velvet Blues Update URLs ===
2
  Contributors: VelvetBlues.com
3
  Donate link: http://www.velvetblues.com/go/updateurlsdonate/
4
- Tags: permalinks, urls, links, update links, move wordpress, location, update urls, update permalinks, move, link, url, permalink, excerpt, content links, excerpt links, custom field links
5
  Requires at least: 2.5
6
- Tested up to: 3.6.1
7
- Stable tag: 3.2.1
8
  License: GPLv2 or later
9
 
10
  Updates all urls and content links in your website.
@@ -39,7 +39,7 @@ Installation and uninstallation are extremely simple. You can use WordPress' aut
39
 
40
  = Usage: =
41
 
42
- Using this plugin is very simple. Once it has been activated, navigate to Settings -> Update URLs and follow the instructions.
43
 
44
 
45
  Get support for this plugin by going to the [Velvet Blues Update URLs plugin page](http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/). Post all questions as comments.
@@ -74,6 +74,10 @@ Get support for this plugin by going to the [Velvet Blues Update URLs plugin pag
74
 
75
  == Change Log ==
76
 
 
 
 
 
77
  = 3.2.1 =
78
  * Bug fixes.
79
  * Added Turkish language file.
1
  === Velvet Blues Update URLs ===
2
  Contributors: VelvetBlues.com
3
  Donate link: http://www.velvetblues.com/go/updateurlsdonate/
4
+ Tags: permalinks, urls, links, update links, move wordpress, location, update urls, update permalinks, move, link, url, permalink, excerpt, content links, excerpt links, custom field links, meta, post meta
5
  Requires at least: 2.5
6
+ Tested up to: 3.9
7
+ Stable tag: 3.2.2
8
  License: GPLv2 or later
9
 
10
  Updates all urls and content links in your website.
39
 
40
  = Usage: =
41
 
42
+ Using this plugin is very simple. Once it has been activated, navigate to Tools -> Update URLs and follow the instructions.
43
 
44
 
45
  Get support for this plugin by going to the [Velvet Blues Update URLs plugin page](http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/). Post all questions as comments.
74
 
75
  == Change Log ==
76
 
77
+ = 3.2.2 =
78
+ * Relocated Update URLs tab to Tools section. It is now found under Tools->Update URLs
79
+ * Added additional serialization checks for postmeta.
80
+
81
  = 3.2.1 =
82
  * Bug fixes.
83
  * Added Turkish language file.
velvet-blues-update-urls.php CHANGED
@@ -2,11 +2,11 @@
2
  /*
3
  Plugin Name: Velvet Blues Update URLs
4
  Plugin URI: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/
5
- Description: This plugin <strong>updates all urls in your website</strong> by replacing old urls with new urls. To get started: 1) Click the "Activate" link to the left of this description, and 2) Go to your <a href="options-general.php?page=velvet-blues-update-urls.php">Update URLs</a> page to use it.
6
  Author: VelvetBlues.com
7
  Author URI: http://www.velvetblues.com/
8
  Author Email: info@velvetblues.com
9
- Version: 3.2.1
10
  License: GPLv2 or later
11
  Text Domain: velvet-blues-update-urls
12
  */
@@ -27,18 +27,20 @@ along with this program; if not, write to the Free Software
27
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
  */
29
  if ( !function_exists( 'add_action' ) ) {
30
- ?><h3>Oops! This page cannot be accessed directly.</h3>
 
31
  <p>For support using the Velvet Blues Update URLs plugin, <a href="http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/" title="Velvet Blues Update URLs WordPress plugin">click here</a>.</p>
32
- <p>If you are looking for general WordPress assistance, <a href="http://www.velvetblues.com/" title="WordPress Web Development and Services">Velvet Blues can help with that too</a>.</p><?php
 
33
  exit;
34
  }
35
- function VelvetBluesUU_add_options_page(){
36
- add_options_page("Velvet Blues Update URLs", "Update URLs", "manage_options", basename(__FILE__), "VelvetBluesUU_options_page");
37
  }
38
  function VelvetBluesUU_load_textdomain(){
39
  load_plugin_textdomain( 'velvet-blues-update-urls', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
40
  }
41
- function VelvetBluesUU_options_page(){
42
  function VB_update_urls($options,$oldurl,$newurl){
43
  global $wpdb;
44
  $results = array();
@@ -51,11 +53,64 @@ function VelvetBluesUU_options_page(){
51
  'guids' => array("UPDATE $wpdb->posts SET guid = replace(guid, %s, %s)", __('GUIDs','velvet-blues-update-urls') )
52
  );
53
  foreach($options as $option){
54
- $result = $wpdb->query( $wpdb->prepare( $queries[$option][0], $oldurl, $newurl) );
55
- $results[$option] = array($result, $queries[$option][1]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
  return $results;
58
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  if ( isset( $_POST['VBUU_settings_submit'] ) && !check_admin_referer('VBUU_submit','VBUU_nonce')){
60
  if(isset($_POST['VBUU_oldurl']) && isset($_POST['VBUU_newurl'])){
61
  if(function_exists('esc_attr')){
@@ -104,18 +159,40 @@ function VelvetBluesUU_options_page(){
104
 
105
  if( $empty ):
106
  ?>
107
- <div id="message" class="error fade"><table><tr><td><p><strong><?php _e('ERROR: Something may have gone wrong.','velvet-blues-update-urls'); ?></strong><br/><?php _e('Your URLs have not been updated.','velvet-blues-update-urls'); ?></p>
108
- <?php
 
 
 
 
 
 
 
109
  else:
110
  ?>
111
- <div id="message" class="updated fade"><table><tr><td><p><strong><?php _e('Success! Your URLs have been updated.','velvet-blues-update-urls'); ?></strong></p>
112
- <?php
 
 
 
 
 
113
  endif;
114
  ?>
115
- <p><u><?php _e('Results','velvet-blues-update-urls'); ?></u><?php echo $resultstring; ?></p>
116
- <?php echo ($empty)? '<p>'.$emptystring.'</p>' : ''; ?>
117
- </td><td width="60"></td>
118
- <td align="center"><?php if( !$empty ): ?><p><?php //You can now uninstall this plugin.<br/> ?><?php printf(__('If you found our plugin useful, %s please consider donating','velvet-blues-update-urls'),'<br/>'); ?>.</p><p><a style="outline:none;" href="http://www.velvetblues.com/go/updateurlsdonate/" target="_blank"><img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" alt="PayPal -<?php _e('The safer, easier way to pay online!','velvet-blues-update-urls'); ?>"></a></p><?php endif; ?></td></tr></table></div>
 
 
 
 
 
 
 
 
 
 
119
  <?php
120
  }
121
  else{
@@ -123,35 +200,110 @@ function VelvetBluesUU_options_page(){
123
  }
124
  }
125
  ?>
126
- <div class="wrap">
127
- <h2>Velvet Blues Update URLs</h2>
128
- <form method="post" action="options-general.php?page=<?php echo basename(__FILE__); ?>">
129
- <?php wp_nonce_field('VBUU_submit','VBUU_nonce'); ?>
130
- <p><?php printf(__("After moving a website, %s lets you fix old URLs in content, excerpts, links, and custom fields.",'velvet-blues-update-urls'),'<strong>Update URLs</strong>'); ?></p><p><strong><?php _e('WE RECOMMEND THAT YOU BACKUP YOUR WEBSITE.','velvet-blues-update-urls'); ?></strong><br/><?php _e('You may need to restore it if incorrect URLs are entered in the fields below.','velvet-blues-update-urls'); ?></p>
131
- <h3 style="margin-bottom:5px;"><?php _e('Step'); ?> 1: <?php _e('Enter your URLs in the fields below','velvet-blues-update-urls'); ?></h3>
132
- <table class="form-table"><tr valign="middle">
133
- <th scope="row" width="140" style="width:140px"><strong><?php _e('Old URL','velvet-blues-update-urls'); ?></strong><br/><span class="description"><?php _e('Old Site Address','velvet-blues-update-urls'); ?></span></th>
134
- <td><input name="VBUU_oldurl" type="text" id="VBUU_oldurl" value="<?php echo (isset($vbuu_oldurl) && trim($vbuu_oldurl) != '')? $vbuu_oldurl : 'http://www.oldurl.com'; ?>" style="width:300px;font-size:20px;" onfocus="if(this.value=='http://www.oldurl.com') this.value='';" onblur="if(this.value=='') this.value='http://www.oldurl.com';" /></td>
135
- </tr>
136
- <tr valign="middle">
137
- <th scope="row" width="140" style="width:140px"><strong><?php _e('New URL','velvet-blues-update-urls'); ?></strong><br/><span class="description"><?php _e('New Site Address','velvet-blues-update-urls'); ?></span></th>
138
- <td><input name="VBUU_newurl" type="text" id="VBUU_newurl" value="<?php echo (isset($vbuu_newurl) && trim($vbuu_newurl) != '')? $vbuu_newurl : 'http://www.newurl.com'; ?>" style="width:300px;font-size:20px;" onfocus="if(this.value=='http://www.newurl.com') this.value='';" onblur="if(this.value=='') this.value='http://www.newurl.com';" /></td>
139
- </tr></table>
140
- <br/>
141
- <h3 style="margin-bottom:5px;"><?php _e('Step'); ?> 2: <?php _e('Choose which URLs should be updated','velvet-blues-update-urls'); ?></h3>
142
- <table class="form-table"><tr><td><p style="line-height:20px;">
143
- <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="content" checked="checked" /> <label for="VBUU_update_true"><strong><?php _e('URLs in page content','velvet-blues-update-urls'); ?></strong> (<?php _e('posts, pages, custom post types, revisions','velvet-blues-update-urls'); ?>)</label><br/>
144
- <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="excerpts" /> <label for="VBUU_update_true"><strong><?php _e('URLs in excerpts','velvet-blues-update-urls'); ?></strong></label><br/>
145
- <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="links" /> <label for="VBUU_update_true"><strong><?php _e('URLs in links','velvet-blues-update-urls'); ?></strong></label><br/>
146
- <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="attachments" /> <label for="VBUU_update_true"><strong><?php _e('URLs for attachments','velvet-blues-update-urls'); ?></strong> (<?php _e('images, documents, general media','velvet-blues-update-urls'); ?>)</label><br/>
147
- <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="custom" /> <label for="VBUU_update_true"><strong><?php _e('URLs in custom fields and meta boxes','velvet-blues-update-urls'); ?></strong></label><br/>
148
- <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="guids" /> <label for="VBUU_update_true"><strong><?php _e('Update ALL GUIDs','velvet-blues-update-urls'); ?></strong> <span class="description" style="color:#f00;"><?php _e('GUIDs for posts should only be changed on development sites.','velvet-blues-update-urls'); ?></span> <a href="http://www.velvetblues.com/go/guids/" target="_blank"><?php _e('Learn More.','velvet-blues-update-urls'); ?></a></label>
149
- </p></td></tr></table>
150
- <p><input class="button-primary" name="VBUU_settings_submit" value="<?php _e('Update URLs NOW','velvet-blues-update-urls'); ?>" type="submit" /></p>
151
- </form>
152
- <p>&nbsp;<br/><strong><?php _e('Need help?','velvet-blues-update-urls'); ?></strong> <?php printf(__("Get support at the %s plugin page%s.",'velvet-blues-update-urls'),'<a href="http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/" target="_blank">Velvet Blues Update URLs','</a>'); ?><?php if( !isset( $empty ) ): ?><br/><strong><?php _e('Want us to do it for you?','velvet-blues-update-urls'); ?></strong> <?php _e('Contact us at','velvet-blues-update-urls'); ?> <a href="mailto:info@velvetblues.com?subject=Move%20My%20WP%20Site">info@velvetblues.com</a>. <?php _e('We will backup your website and move it for $65 OR update your URLs for only $29.','velvet-blues-update-urls'); ?><?php endif; ?></p>
153
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  }
155
- add_action('admin_menu', 'VelvetBluesUU_add_options_page');
156
  add_action('admin_init','VelvetBluesUU_load_textdomain');
157
- ?>
2
  /*
3
  Plugin Name: Velvet Blues Update URLs
4
  Plugin URI: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/
5
+ Description: This plugin <strong>updates all urls in your website</strong> by replacing old urls with new urls. To get started: 1) Click the "Activate" link to the left of this description, and 2) Go to your <a href="tools.php?page=velvet-blues-update-urls.php">Update URLs</a> page to use it.
6
  Author: VelvetBlues.com
7
  Author URI: http://www.velvetblues.com/
8
  Author Email: info@velvetblues.com
9
+ Version: 3.2.2
10
  License: GPLv2 or later
11
  Text Domain: velvet-blues-update-urls
12
  */
27
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
  */
29
  if ( !function_exists( 'add_action' ) ) {
30
+ ?>
31
+ <h3>Oops! This page cannot be accessed directly.</h3>
32
  <p>For support using the Velvet Blues Update URLs plugin, <a href="http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/" title="Velvet Blues Update URLs WordPress plugin">click here</a>.</p>
33
+ <p>If you are looking for general WordPress assistance, <a href="http://www.velvetblues.com/" title="WordPress Web Development and Services">Velvet Blues can help with that too</a>.</p>
34
+ <?php
35
  exit;
36
  }
37
+ function VelvetBluesUU_add_management_page(){
38
+ add_management_page("Velvet Blues Update URLs", "Update URLs", "manage_options", basename(__FILE__), "VelvetBluesUU_management_page");
39
  }
40
  function VelvetBluesUU_load_textdomain(){
41
  load_plugin_textdomain( 'velvet-blues-update-urls', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
42
  }
43
+ function VelvetBluesUU_management_page(){
44
  function VB_update_urls($options,$oldurl,$newurl){
45
  global $wpdb;
46
  $results = array();
53
  'guids' => array("UPDATE $wpdb->posts SET guid = replace(guid, %s, %s)", __('GUIDs','velvet-blues-update-urls') )
54
  );
55
  foreach($options as $option){
56
+ if( $option == 'custom' ){
57
+ $n = 0;
58
+ $row_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->postmeta" );
59
+ $page_size = 10000;
60
+ $pages = ceil( $row_count / $page_size );
61
+
62
+ for( $page = 0; $page < $pages; $page++ ) {
63
+ $current_row = 0;
64
+ $start = $page * $page_size;
65
+ $end = $start + $page_size;
66
+ $pmquery = "SELECT * FROM $wpdb->postmeta WHERE meta_value <> ''";
67
+ $items = $wpdb->get_results( $pmquery );
68
+ foreach( $items as $item ){
69
+ $value = $item->meta_value;
70
+ if( trim($value) == '' )
71
+ continue;
72
+
73
+ $edited = VB_unserialize_replace( $oldurl, $newurl, $value );
74
+
75
+ if( $edited != $value ){
76
+ $fix = $wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '".$edited."' WHERE meta_id = ".$item->meta_id );
77
+ if( $fix )
78
+ $n++;
79
+ }
80
+ }
81
+ }
82
+ $results[$option] = array($n, $queries[$option][1]);
83
+ }
84
+ else{
85
+ $result = $wpdb->query( $wpdb->prepare( $queries[$option][0], $oldurl, $newurl) );
86
+ $results[$option] = array($result, $queries[$option][1]);
87
+ }
88
  }
89
  return $results;
90
  }
91
+ function VB_unserialize_replace( $from = '', $to = '', $data = '', $serialised = false ) {
92
+ try {
93
+ if ( is_string( $data ) && ( $unserialized = @unserialize( $data ) ) !== false ) {
94
+ $data = VB_unserialize_replace( $from, $to, $unserialized, true );
95
+ }
96
+ elseif ( is_array( $data ) ) {
97
+ $_tmp = array( );
98
+ foreach ( $data as $key => $value ) {
99
+ $_tmp[ $key ] = VB_unserialize_replace( $from, $to, $value, false );
100
+ }
101
+ $data = $_tmp;
102
+ unset( $_tmp );
103
+ }
104
+ else {
105
+ if ( is_string( $data ) )
106
+ $data = str_replace( $from, $to, $data );
107
+ }
108
+ if ( $serialised )
109
+ return serialize( $data );
110
+ } catch( Exception $error ) {
111
+ }
112
+ return $data;
113
+ }
114
  if ( isset( $_POST['VBUU_settings_submit'] ) && !check_admin_referer('VBUU_submit','VBUU_nonce')){
115
  if(isset($_POST['VBUU_oldurl']) && isset($_POST['VBUU_newurl'])){
116
  if(function_exists('esc_attr')){
159
 
160
  if( $empty ):
161
  ?>
162
+ <div id="message" class="error fade">
163
+ <table>
164
+ <tr>
165
+ <td><p><strong>
166
+ <?php _e('ERROR: Something may have gone wrong.','velvet-blues-update-urls'); ?>
167
+ </strong><br/>
168
+ <?php _e('Your URLs have not been updated.','velvet-blues-update-urls'); ?>
169
+ </p>
170
+ <?php
171
  else:
172
  ?>
173
+ <div id="message" class="updated fade">
174
+ <table>
175
+ <tr>
176
+ <td><p><strong>
177
+ <?php _e('Success! Your URLs have been updated.','velvet-blues-update-urls'); ?>
178
+ </strong></p>
179
+ <?php
180
  endif;
181
  ?>
182
+ <p><u>
183
+ <?php _e('Results','velvet-blues-update-urls'); ?>
184
+ </u><?php echo $resultstring; ?></p>
185
+ <?php echo ($empty)? '<p>'.$emptystring.'</p>' : ''; ?></td>
186
+ <td width="60"></td>
187
+ <td align="center"><?php if( !$empty ): ?>
188
+ <p>
189
+ <?php //You can now uninstall this plugin.<br/> ?>
190
+ <?php printf(__('If you found our plugin useful, %s please consider donating','velvet-blues-update-urls'),'<br/>'); ?>.</p>
191
+ <p><a style="outline:none;" href="http://www.velvetblues.com/go/updateurlsdonate/" target="_blank"><img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" alt="PayPal -<?php _e('The safer, easier way to pay online!','velvet-blues-update-urls'); ?>"></a></p>
192
+ <?php endif; ?></td>
193
+ </tr>
194
+ </table>
195
+ </div>
196
  <?php
197
  }
198
  else{
200
  }
201
  }
202
  ?>
203
+ <div class="wrap">
204
+ <h2>Velvet Blues Update URLs</h2>
205
+ <form method="post" action="tools.php?page=<?php echo basename(__FILE__); ?>">
206
+ <?php wp_nonce_field('VBUU_submit','VBUU_nonce'); ?>
207
+ <p><?php printf(__("After moving a website, %s lets you fix old URLs in content, excerpts, links, and custom fields.",'velvet-blues-update-urls'),'<strong>Update URLs</strong>'); ?></p>
208
+ <p><strong>
209
+ <?php _e('WE RECOMMEND THAT YOU BACKUP YOUR WEBSITE.','velvet-blues-update-urls'); ?>
210
+ </strong><br/>
211
+ <?php _e('You may need to restore it if incorrect URLs are entered in the fields below.','velvet-blues-update-urls'); ?>
212
+ </p>
213
+ <h3 style="margin-bottom:5px;">
214
+ <?php _e('Step'); ?>
215
+ 1:
216
+ <?php _e('Enter your URLs in the fields below','velvet-blues-update-urls'); ?>
217
+ </h3>
218
+ <table class="form-table">
219
+ <tr valign="middle">
220
+ <th scope="row" width="140" style="width:140px"><strong>
221
+ <?php _e('Old URL','velvet-blues-update-urls'); ?>
222
+ </strong><br/>
223
+ <span class="description">
224
+ <?php _e('Old Site Address','velvet-blues-update-urls'); ?>
225
+ </span></th>
226
+ <td><input name="VBUU_oldurl" type="text" id="VBUU_oldurl" value="<?php echo (isset($vbuu_oldurl) && trim($vbuu_oldurl) != '')? $vbuu_oldurl : 'http://www.oldurl.com'; ?>" style="width:300px;font-size:20px;" onfocus="if(this.value=='http://www.oldurl.com') this.value='';" onblur="if(this.value=='') this.value='http://www.oldurl.com';" /></td>
227
+ </tr>
228
+ <tr valign="middle">
229
+ <th scope="row" width="140" style="width:140px"><strong>
230
+ <?php _e('New URL','velvet-blues-update-urls'); ?>
231
+ </strong><br/>
232
+ <span class="description">
233
+ <?php _e('New Site Address','velvet-blues-update-urls'); ?>
234
+ </span></th>
235
+ <td><input name="VBUU_newurl" type="text" id="VBUU_newurl" value="<?php echo (isset($vbuu_newurl) && trim($vbuu_newurl) != '')? $vbuu_newurl : 'http://www.newurl.com'; ?>" style="width:300px;font-size:20px;" onfocus="if(this.value=='http://www.newurl.com') this.value='';" onblur="if(this.value=='') this.value='http://www.newurl.com';" /></td>
236
+ </tr>
237
+ </table>
238
+ <br/>
239
+ <h3 style="margin-bottom:5px;">
240
+ <?php _e('Step'); ?>
241
+ 2:
242
+ <?php _e('Choose which URLs should be updated','velvet-blues-update-urls'); ?>
243
+ </h3>
244
+ <table class="form-table">
245
+ <tr>
246
+ <td><p style="line-height:20px;">
247
+ <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="content" checked="checked" />
248
+ <label for="VBUU_update_true"><strong>
249
+ <?php _e('URLs in page content','velvet-blues-update-urls'); ?>
250
+ </strong> (
251
+ <?php _e('posts, pages, custom post types, revisions','velvet-blues-update-urls'); ?>
252
+ )</label>
253
+ <br/>
254
+ <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="excerpts" />
255
+ <label for="VBUU_update_true"><strong>
256
+ <?php _e('URLs in excerpts','velvet-blues-update-urls'); ?>
257
+ </strong></label>
258
+ <br/>
259
+ <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="links" />
260
+ <label for="VBUU_update_true"><strong>
261
+ <?php _e('URLs in links','velvet-blues-update-urls'); ?>
262
+ </strong></label>
263
+ <br/>
264
+ <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="attachments" />
265
+ <label for="VBUU_update_true"><strong>
266
+ <?php _e('URLs for attachments','velvet-blues-update-urls'); ?>
267
+ </strong> (
268
+ <?php _e('images, documents, general media','velvet-blues-update-urls'); ?>
269
+ )</label>
270
+ <br/>
271
+ <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="custom" />
272
+ <label for="VBUU_update_true"><strong>
273
+ <?php _e('URLs in custom fields and meta boxes','velvet-blues-update-urls'); ?>
274
+ </strong></label>
275
+ <br/>
276
+ <input name="VBUU_update_links[]" type="checkbox" id="VBUU_update_true" value="guids" />
277
+ <label for="VBUU_update_true"><strong>
278
+ <?php _e('Update ALL GUIDs','velvet-blues-update-urls'); ?>
279
+ </strong> <span class="description" style="color:#f00;">
280
+ <?php _e('GUIDs for posts should only be changed on development sites.','velvet-blues-update-urls'); ?>
281
+ </span> <a href="http://www.velvetblues.com/go/guids/" target="_blank">
282
+ <?php _e('Learn More.','velvet-blues-update-urls'); ?>
283
+ </a></label>
284
+ </p></td>
285
+ </tr>
286
+ </table>
287
+ <p>
288
+ <input class="button-primary" name="VBUU_settings_submit" value="<?php _e('Update URLs NOW','velvet-blues-update-urls'); ?>" type="submit" />
289
+ </p>
290
+ </form>
291
+ <p>&nbsp;<br/>
292
+ <strong>
293
+ <?php _e('Need help?','velvet-blues-update-urls'); ?>
294
+ </strong> <?php printf(__("Get support at the %s plugin page%s.",'velvet-blues-update-urls'),'<a href="http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/" target="_blank">Velvet Blues Update URLs','</a>'); ?>
295
+ <?php if( !isset( $empty ) ): ?>
296
+ <br/>
297
+ <strong>
298
+ <?php _e('Want us to do it for you?','velvet-blues-update-urls'); ?>
299
+ </strong>
300
+ <?php _e('Contact us at','velvet-blues-update-urls'); ?>
301
+ <a href="mailto:info@velvetblues.com?subject=Move%20My%20WP%20Site">info@velvetblues.com</a>.
302
+ <?php _e('We will backup your website and move it for $65 OR update your URLs for only $29.','velvet-blues-update-urls'); ?>
303
+ <?php endif; ?>
304
+ </p>
305
+ <?php
306
  }
307
+ add_action('admin_menu', 'VelvetBluesUU_add_management_page');
308
  add_action('admin_init','VelvetBluesUU_load_textdomain');
309
+ ?>