Version Description
Download this release
Release Info
Developer | VelvetBlues.com |
Plugin | Velvet Blues Update URLs |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1
- readme.txt +9 -4
- velvet-blues-update-urls.php +19 -21
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Velvet Blues Update URLs ===
|
2 |
-
Contributors:
|
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.
|
7 |
-
Stable tag: 2.0
|
8 |
|
9 |
Updates all urls and content links in your website.
|
10 |
|
@@ -45,6 +45,10 @@ Uninstalling:
|
|
45 |
|
46 |
Get support for this plugin by going to [Velvet Blues Web Development Blog](http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/). Post all questions as comments.
|
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.
|
@@ -59,4 +63,5 @@ Using this plugin is very simple. Once it has been activated, navigate to Settin
|
|
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.
|
|
1 |
=== Velvet Blues Update URLs ===
|
2 |
+
Contributors: VelvetBlues.com
|
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.1.1
|
7 |
+
Stable tag: 2.0.1
|
8 |
|
9 |
Updates all urls and content links in your website.
|
10 |
|
45 |
|
46 |
Get support for this plugin by going to [Velvet Blues Web Development Blog](http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/). Post all questions as comments.
|
47 |
|
48 |
+
= Why are my urls not updated? =
|
49 |
+
|
50 |
+
URLs are only replaced when an exact match is found. Be sure that you have entered the correct url and hit submit. (Note: Matching is case-sensitive.)
|
51 |
+
|
52 |
== Usage ==
|
53 |
|
54 |
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.
|
63 |
* 1.0.1 - Fixed possible interactions with other plugins.
|
64 |
* 1.0.2 - Fixed PHP short tag problem, so as to be compatible with all configurations.
|
65 |
* 1.0.3 - Confirmed compatibility with recent WordPress releases.
|
66 |
+
* 2.0 - Added the ability to update links in excerpt fields. Updated code for full compatibility with WordPress 3.0 releases.
|
67 |
+
* 2.0.1 - Confirmed compatibility with WordPress 3.1.x releases. Updated FAQs and Contributors.
|
velvet-blues-update-urls.php
CHANGED
@@ -3,11 +3,11 @@
|
|
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:
|
7 |
Author URI: http://www.velvetblues.com/
|
8 |
-
Version: 2.0
|
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
|
@@ -25,27 +25,25 @@ Version: 2.0
|
|
25 |
*/
|
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 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
}
|
46 |
-
|
47 |
-
if( isset( $_POST['VBUU_settings_submit'] ) ) {
|
48 |
-
|
49 |
$vbuu_update_links = attribute_escape($_POST['VBUU_update_links']);
|
50 |
$vbuu_oldurl = attribute_escape($_POST['VBUU_oldurl']);
|
51 |
$vbuu_newurl = attribute_escape($_POST['VBUU_newurl']);
|
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: VelvetBlues.com
|
7 |
Author URI: http://www.velvetblues.com/
|
8 |
+
Version: 2.0.1
|
9 |
*/
|
10 |
+
/* Copyright 2011 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
|
25 |
*/
|
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 |
+
/* Function which updates urls */
|
33 |
+
function VB_update_urls($links,$oldurl,$newurl){
|
34 |
+
global $wpdb;
|
35 |
+
//permalinks query
|
36 |
+
$permquery = "UPDATE $wpdb->posts SET guid = replace(guid, '".$oldurl."','".$newurl."')";
|
37 |
+
$result = $wpdb->query( $permquery );
|
38 |
+
if($links == 1){
|
39 |
+
//content query
|
40 |
+
$contquery = "UPDATE $wpdb->posts SET post_content = replace(post_content, '".$oldurl."','".$newurl."')";
|
41 |
+
$result = $wpdb->query( $contquery );
|
42 |
+
$excquery = "UPDATE $wpdb->posts SET post_excerpt = replace(post_excerpt, '".$oldurl."','".$newurl."')";
|
43 |
+
$result = $wpdb->query( $excquery );
|
44 |
+
}
|
45 |
}
|
46 |
+
if( isset( $_POST['VBUU_settings_submit'] ) ){
|
|
|
|
|
47 |
$vbuu_update_links = attribute_escape($_POST['VBUU_update_links']);
|
48 |
$vbuu_oldurl = attribute_escape($_POST['VBUU_oldurl']);
|
49 |
$vbuu_newurl = attribute_escape($_POST['VBUU_newurl']);
|