Go Live Update URLS - Version 1.2.1

Version Description

  • Added support for other prefixes besides wp_
Download this release

Release Info

Developer Mat Lipe
Plugin Icon 128x128 Go Live Update URLS
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2 to 1.2.1

go-live-functions.php CHANGED
@@ -2,13 +2,13 @@
2
 
3
  # creates a list of checked boxes for each table
4
  function make_checked_boxes(){
5
- global $wpdb;
6
  $god_query = "SELECT TABLE_NAME FROM information_schema.TABLES where TABLE_SCHEMA='".$wpdb->dbname."'";
7
 
8
  $all = $wpdb->get_results($god_query);
9
  echo '<br>';
10
  foreach($all as $v){
11
- if($v->TABLE_NAME != 'wp_options'):
12
  printf('<input name="%s" type="checkbox" value="%s" checked /> %s<br>',$v->TABLE_NAME,$v->TABLE_NAME,$v->TABLE_NAME);
13
  else:
14
  printf('<input name="%s" type="checkbox" value="%s" /> %s<br>',$v->TABLE_NAME,$v->TABLE_NAME,$v->TABLE_NAME);
2
 
3
  # creates a list of checked boxes for each table
4
  function make_checked_boxes(){
5
+ global $wpdb, $table_prefix;
6
  $god_query = "SELECT TABLE_NAME FROM information_schema.TABLES where TABLE_SCHEMA='".$wpdb->dbname."'";
7
 
8
  $all = $wpdb->get_results($god_query);
9
  echo '<br>';
10
  foreach($all as $v){
11
+ if($v->TABLE_NAME != $table_prefix .'options'):
12
  printf('<input name="%s" type="checkbox" value="%s" checked /> %s<br>',$v->TABLE_NAME,$v->TABLE_NAME,$v->TABLE_NAME);
13
  else:
14
  printf('<input name="%s" type="checkbox" value="%s" /> %s<br>',$v->TABLE_NAME,$v->TABLE_NAME,$v->TABLE_NAME);
go-live-update-urls.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://lipeimagination.info/
5
  Description: This Plugin Updates all the URLs in the database to point to the new URL when making your site live or channging domains.
6
  Author: Mat Lipe
7
  Author URI: http://lipeimagination/
8
- Version: 1.2
9
  */
10
  /* Copyright 2011 Mat Lipe (mat@lipeimagination.info);
11
 
@@ -18,6 +18,8 @@ Version: 1.2
18
 
19
 
20
 
 
 
21
  /* Functions for the options page */
22
  function add_url_options(){
23
  add_options_page("Go Live Setings", "Go Live", "manage_options", basename(__FILE__), "url_options_page");
@@ -34,13 +36,20 @@ Version: 1.2
34
  // update_urls($update_links,$oldurl,$newurl);
35
  echo '<div id="message" class="updated fade"><p><strong>URLs have been updated.</p></strong><p>You can now uninstall this plugin.</p></div>';
36
  }
 
 
 
 
37
  ?>
38
  <div class="wrap">
39
  <h2>Go Live Update Urls</h2>
40
  <form method="post" action="options-general.php?page=<?php echo basename(__FILE__); ?>">
41
  <p>This will replace all occurrences "in the entire database" of the old URL with the New URL. <br />Uncheck any tables that you would not like to update.</p>
42
- <h4> THIS DOES NOT UPDATE THE WP_OPTIONS TABLE BY DEFAULT DUE TO WIDGET ISSUES. YOU MUST MANUALLY CHANGE YOUR SITES URL IN THE DASHBOARD'S GENERAL SETTINGS BEFORE RUNNING THIS PLUGIN! IF YOU MUST UPDATE THE WP_OPTIONS TABLE, RUN THIS PLUGIN THEN CLICK SAVE AT THE BOTTOM ON ALL YOUR WIDGETS, THEN RUN THIS PLUGIN WITH THE WP_OPTIONS BOX CHECKED.</h4>
43
- Like any other database updating tool, you should always prefrom a backup before running.
 
 
 
44
  <?php make_checked_boxes(); ?>
45
  <table class="form-table">
46
  <tr>
5
  Description: This Plugin Updates all the URLs in the database to point to the new URL when making your site live or channging domains.
6
  Author: Mat Lipe
7
  Author URI: http://lipeimagination/
8
+ Version: 1.2.1
9
  */
10
  /* Copyright 2011 Mat Lipe (mat@lipeimagination.info);
11
 
18
 
19
 
20
 
21
+ echo $table_prefix;
22
+
23
  /* Functions for the options page */
24
  function add_url_options(){
25
  add_options_page("Go Live Setings", "Go Live", "manage_options", basename(__FILE__), "url_options_page");
36
  // update_urls($update_links,$oldurl,$newurl);
37
  echo '<div id="message" class="updated fade"><p><strong>URLs have been updated.</p></strong><p>You can now uninstall this plugin.</p></div>';
38
  }
39
+
40
+ global $table_prefix;
41
+ $pr = strtoupper($table_prefix);
42
+
43
  ?>
44
  <div class="wrap">
45
  <h2>Go Live Update Urls</h2>
46
  <form method="post" action="options-general.php?page=<?php echo basename(__FILE__); ?>">
47
  <p>This will replace all occurrences "in the entire database" of the old URL with the New URL. <br />Uncheck any tables that you would not like to update.</p>
48
+ <h4> THIS DOES NOT UPDATE THE <?php echo $pr; ?>OPTIONS TABLE BY DEFAULT DUE TO WIDGET ISSUES. <br>
49
+ YOU MUST MANUALLY CHANGE YOUR SITES URL IN THE DASHBOARD'S GENERAL SETTINGS BEFORE RUNNING THIS PLUGIN! <br>
50
+ IF YOU MUST UPDATE THE <?php echo $pr; ?>OPTIONS TABLE, RUN THIS PLUGIN THEN CLICK SAVE AT THE BOTTOM ON ALL YOUR WIDGETS, <br>
51
+ THEN RUN THIS PLUGIN WITH THE <?php echo $pr; ?>OPTIONS BOX CHECKED.</h4>
52
+ <em>Like any other database updating tool, you should always perfrom a backup before running.</em><br>
53
  <?php make_checked_boxes(); ?>
54
  <table class="form-table">
55
  <tr>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Mat Lipe
3
  Donate link: http://lipeimagination.info/contact/
4
  Tags: Go Live, Urls, Domain Changes
5
  Requires at least: 3.1
6
- Tested up to: 3.3.1
7
- Stable tag: 1.2
8
 
9
  == Description ==
10
 
@@ -41,6 +41,9 @@ There are a few plugins out there that use certain values in the wp-options tabl
41
 
42
  == Changelog ==
43
 
 
 
 
44
  = 1.2 =
45
  * Added the wp_options to the available tables to be updated and unchecked the table by default.
46
 
@@ -49,6 +52,9 @@ There are a few plugins out there that use certain values in the wp-options tabl
49
 
50
  == Upgrade Notice ==
51
 
 
 
 
52
  = 1.2 =
53
  This Version will add the wp_options to the available tables and uncheck the table by default.
54
 
3
  Donate link: http://lipeimagination.info/contact/
4
  Tags: Go Live, Urls, Domain Changes
5
  Requires at least: 3.1
6
+ Tested up to: 3.3.2
7
+ Stable tag: 1.2.1
8
 
9
  == Description ==
10
 
41
 
42
  == Changelog ==
43
 
44
+ = 1.2.1 =
45
+ * Added support for other prefixes besides wp_
46
+
47
  = 1.2 =
48
  * Added the wp_options to the available tables to be updated and unchecked the table by default.
49
 
52
 
53
  == Upgrade Notice ==
54
 
55
+ = 1.2.1 =
56
+ This Version will uncheck your options table by default for the wp_options as well as other table prefixes.
57
+
58
  = 1.2 =
59
  This Version will add the wp_options to the available tables and uncheck the table by default.
60
 
screenshot-1.png ADDED
Binary file