Version Description
Download this release
Release Info
Developer | VelvetBlues.com |
Plugin | Velvet Blues Update URLs |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 2.0
- readme.txt +10 -9
- screenshot-1.png +0 -0
- velvet-blues-update-urls.php +16 -18
readme.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
=== Velvet Blues Update URLs ===
|
2 |
Contributors: Velvet Blues
|
3 |
Donate link: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/
|
4 |
-
Tags: permalinks, urls, links, update links, move wordpress, location, update urls, update permalinks, move, link, url, permalink
|
5 |
Requires at least: 2.5
|
6 |
-
Tested up to:
|
7 |
-
Stable tag:
|
8 |
|
9 |
Updates all urls and content links in your website.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
14 |
|
15 |
Features:
|
16 |
|
17 |
-
*
|
18 |
-
* Choose whether links embedded in content should be updated
|
19 |
|
20 |
== Installation ==
|
21 |
|
@@ -47,15 +47,16 @@ Uninstalling:
|
|
47 |
|
48 |
== Usage ==
|
49 |
|
50 |
-
Using this plugin is very simple.
|
51 |
|
52 |
|
53 |
== Screenshots ==
|
54 |
|
55 |
-
1. The Admin screen for the plugin.
|
56 |
|
57 |
== Update Log ==
|
58 |
|
59 |
* 1.0.1 - Fixed possible interactions with other plugins.
|
60 |
* 1.0.2 - Fixed PHP short tag problem, so as to be compatible with all configurations.
|
61 |
-
* 1.0.3 - Confirmed compatibility with recent WordPress releases.
|
|
1 |
=== Velvet Blues Update URLs ===
|
2 |
Contributors: Velvet Blues
|
3 |
Donate link: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/
|
4 |
+
Tags: permalinks, urls, links, update links, move wordpress, location, update urls, update permalinks, move, link, url, permalink, excerpt, content links
|
5 |
Requires at least: 2.5
|
6 |
+
Tested up to: 3.0.1
|
7 |
+
Stable tag: 2.0
|
8 |
|
9 |
Updates all urls and content links in your website.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
If you move your WordPress website to a new domain name, you will find that internal links to pages and references to images are not updated. Instead, these links and references will point to your old domain name. This plugin fixes that problem. This Update URLs plugin updates all urls and content links in your website.
|
14 |
|
15 |
Features:
|
16 |
|
17 |
+
* Choose to update permalinks
|
18 |
+
* Choose whether links embedded in content and excerpts should be updated
|
19 |
|
20 |
== Installation ==
|
21 |
|
47 |
|
48 |
== Usage ==
|
49 |
|
50 |
+
Using this plugin is very simple. Once it has been activated, navigate to Settings -> Update and follow the instructions. You will need to enter your old and new urls. Upon submitting, all permalinks and links will be updated.
|
51 |
|
52 |
|
53 |
== Screenshots ==
|
54 |
|
55 |
+
1. The Admin screen for the plugin. screenshot-1.png
|
56 |
|
57 |
== Update Log ==
|
58 |
|
59 |
* 1.0.1 - Fixed possible interactions with other plugins.
|
60 |
* 1.0.2 - Fixed PHP short tag problem, so as to be compatible with all configurations.
|
61 |
+
* 1.0.3 - Confirmed compatibility with recent WordPress releases.
|
62 |
+
* 2.0 - Added the ability to update links in excerpt fields. Updated code for full compatibility with WordPress 3.0 releases.
|
screenshot-1.png
CHANGED
Binary file
|
velvet-blues-update-urls.php
CHANGED
@@ -2,12 +2,12 @@
|
|
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 updates all urls in your website by replacing
|
6 |
Author: Velvet Blues
|
7 |
Author URI: http://www.velvetblues.com/
|
8 |
-
Version:
|
9 |
*/
|
10 |
-
/* Copyright
|
11 |
|
12 |
This program is free software; you can redistribute it and/or modify
|
13 |
it under the terms of the GNU General Public License as published by
|
@@ -26,7 +26,7 @@ Version: 1.0.3
|
|
26 |
|
27 |
/* Functions for the options page */
|
28 |
function VelvetBluesUU_add_options_page() {
|
29 |
-
add_options_page("Update URLs Setings", "Update Urls", "manage_options", __FILE__, "VelvetBluesUU_options_page");
|
30 |
}
|
31 |
function VelvetBluesUU_options_page() {
|
32 |
|
@@ -40,6 +40,8 @@ Version: 1.0.3
|
|
40 |
//content query
|
41 |
$contquery = "UPDATE $wpdb->posts SET post_content = replace(post_content, '".$oldurl."','".$newurl."')";
|
42 |
$result = $wpdb->query( $contquery );
|
|
|
|
|
43 |
}
|
44 |
}
|
45 |
if( isset( $_POST['VBUU_settings_submit'] ) ) {
|
@@ -53,31 +55,26 @@ Version: 1.0.3
|
|
53 |
?>
|
54 |
<div class="wrap">
|
55 |
<h2>Update URLs Settings</h2>
|
56 |
-
<form method="post" action="options-general.php?page
|
57 |
<input type="hidden" id="_wpnonce" name="_wpnonce" value="abcab64052" />
|
58 |
-
<p>These settings let you update
|
59 |
-
<p><b>Current Website Addresss:</b> <?php bloginfo('url'); ?></p>
|
60 |
-
<p><b>Current Installation Location:</b> <?php bloginfo('wpurl'); ?></p>
|
61 |
-
<p>If the settings above do not reflect the new location or domain, then you will need to <a href="options-general.php">update these settings</a> before or after you run this tool.</p>
|
62 |
<table class="form-table">
|
63 |
<tr>
|
64 |
-
<th scope="row" style="width:
|
65 |
-
<
|
66 |
-
<
|
67 |
-
<p><input name="VBUU_update_links" type="radio" id="VBUU_update_false" value="0" /> <label for="VBUU_update_false">No, I only want to update the urls, and not any links.</label></p>
|
68 |
</td>
|
69 |
-
|
70 |
</tr>
|
71 |
<tr>
|
72 |
-
<th scope="row" style="width:
|
73 |
<td>
|
74 |
-
<
|
75 |
</td>
|
76 |
</tr>
|
77 |
<tr>
|
78 |
-
<th scope="row" style="width:
|
79 |
<td>
|
80 |
-
<
|
81 |
</td>
|
82 |
</tr>
|
83 |
</table>
|
@@ -85,6 +82,7 @@ Version: 1.0.3
|
|
85 |
<input name="VBUU_settings_submit" value="Update URLs" type="submit" />
|
86 |
</p>
|
87 |
</form>
|
|
|
88 |
<?php
|
89 |
}
|
90 |
add_action('admin_menu', 'VelvetBluesUU_add_options_page');
|
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 updates all urls in your website by replacing old urls with new urls.
|
6 |
Author: Velvet Blues
|
7 |
Author URI: http://www.velvetblues.com/
|
8 |
+
Version: 2.0
|
9 |
*/
|
10 |
+
/* Copyright 2010 Velvet Blues Web Design (email : info@velvetblues.com)
|
11 |
|
12 |
This program is free software; you can redistribute it and/or modify
|
13 |
it under the terms of the GNU General Public License as published by
|
26 |
|
27 |
/* Functions for the options page */
|
28 |
function VelvetBluesUU_add_options_page() {
|
29 |
+
add_options_page("Update URLs Setings", "Update Urls", "manage_options", basename(__FILE__), "VelvetBluesUU_options_page");
|
30 |
}
|
31 |
function VelvetBluesUU_options_page() {
|
32 |
|
40 |
//content query
|
41 |
$contquery = "UPDATE $wpdb->posts SET post_content = replace(post_content, '".$oldurl."','".$newurl."')";
|
42 |
$result = $wpdb->query( $contquery );
|
43 |
+
$excquery = "UPDATE $wpdb->posts SET post_excerpt = replace(post_excerpt, '".$oldurl."','".$newurl."')";
|
44 |
+
$result = $wpdb->query( $excquery );
|
45 |
}
|
46 |
}
|
47 |
if( isset( $_POST['VBUU_settings_submit'] ) ) {
|
55 |
?>
|
56 |
<div class="wrap">
|
57 |
<h2>Update URLs Settings</h2>
|
58 |
+
<form method="post" action="options-general.php?page=<?php echo basename(__FILE__); ?>">
|
59 |
<input type="hidden" id="_wpnonce" name="_wpnonce" value="abcab64052" />
|
60 |
+
<p>These settings let you update your permalinks AND any old urls embedded in content or excerpts.<br/>It will replace all occurences of the old url with the new url.</p>
|
|
|
|
|
|
|
61 |
<table class="form-table">
|
62 |
<tr>
|
63 |
+
<th scope="row" style="width:150px;"><b>Update permalinks<br/>AS WELL AS<br/>links in site content?</b></th><td>
|
64 |
+
<p style="margin:0;padding:0;"><input name="VBUU_update_links" type="radio" id="VBUU_update_true" value="1" checked="checked" /> <label for="VBUU_update_true">Yes</label><br/>
|
65 |
+
<input name="VBUU_update_links" type="radio" id="VBUU_update_false" value="0" /> <label for="VBUU_update_false">No, I only want to update page and image urls,<br/>and not any links to pages or images that may be<br/>embedded in content.</label></p> <br/>
|
|
|
66 |
</td>
|
|
|
67 |
</tr>
|
68 |
<tr>
|
69 |
+
<th scope="row" style="width:150px;"><b>Old URL</b></th>
|
70 |
<td>
|
71 |
+
<input name="VBUU_oldurl" type="text" id="VBUU_oldurl" value="" style="width:300px;" />
|
72 |
</td>
|
73 |
</tr>
|
74 |
<tr>
|
75 |
+
<th scope="row" style="width:150px;"><b>New URL</b></th>
|
76 |
<td>
|
77 |
+
<input name="VBUU_newurl" type="text" id="VBUU_newurl" value="" style="width:300px;" />
|
78 |
</td>
|
79 |
</tr>
|
80 |
</table>
|
82 |
<input name="VBUU_settings_submit" value="Update URLs" type="submit" />
|
83 |
</p>
|
84 |
</form>
|
85 |
+
<p> <br/>Need help? Get support at the <a href="http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/" target="_blank">Velvet Blues Update URLs plugin page</a>.</p>
|
86 |
<?php
|
87 |
}
|
88 |
add_action('admin_menu', 'VelvetBluesUU_add_options_page');
|