Go Live Update URLS - Version 4.0.1

Version Description

Download this release

Release Info

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

Code changes from version 4.0.0 to 4.0.1

go-live-update-urls.php CHANGED
@@ -5,15 +5,15 @@ Plugin URI: https://matlipe.com/go-live-update-urls/
5
Description: Updates all the URLs in the database to point to the new URL when making your site live or changing domains.
6
Author: Mat Lipe
7
Author URI: https://matlipe.com/
8
- Version: 4.0.0
9
Text Domain: go-live-update-urls
10
*/
11
- define( 'GLUU_VERSION', "4.0.0" );
12
13
define( 'GLUU_VIEWS_DIR', plugin_dir_path(__FILE__) . 'views/' );
14
define( 'GLUU_URL_VIEWS_DIR', plugins_url('go-live-update-urls').'/views/' );
15
16
- require( 'src/GoLiveUpdateUrls.php' );
17
18
add_action('plugins_loaded', 'gluu_load' );
19
function gluu_load(){
5
Description: Updates all the URLs in the database to point to the new URL when making your site live or changing domains.
6
Author: Mat Lipe
7
Author URI: https://matlipe.com/
8
+ Version: 4.0.1
9
Text Domain: go-live-update-urls
10
*/
11
+ define( 'GLUU_VERSION', "4.0.1" );
12
13
define( 'GLUU_VIEWS_DIR', plugin_dir_path(__FILE__) . 'views/' );
14
define( 'GLUU_URL_VIEWS_DIR', plugins_url('go-live-update-urls').'/views/' );
15
16
+ require( plugin_dir_path( __FILE__ ) . '/src/GoLiveUpdateUrls.php' );
17
18
add_action('plugins_loaded', 'gluu_load' );
19
function gluu_load(){
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypa
4
Tags: Go Live, Urls, Domain Changes
5
Requires at least: 3.1
6
Tested up to: 4.5.2
7
- Stable tag: 4.0.0
8
9
== Description ==
10
4
Tags: Go Live, Urls, Domain Changes
5
Requires at least: 3.1
6
Tested up to: 4.5.2
7
+ Stable tag: 4.0.1
8
9
== Description ==
10
src/GoLiveUpdateUrls.php CHANGED
@@ -54,7 +54,12 @@ class GoLiveUpdateUrls {
54
$this->oldurl = trim( strip_tags( $_POST[ 'oldurl' ] ) );
55
$this->newurl = trim( strip_tags( $_POST[ 'newurl' ] ) );
56
57
- $this->tables = $_POST[ self::TABLE_INPUT_NAME ];
58
59
do_action( 'gluu-before-make-update', $this );
60
@@ -68,10 +73,13 @@ class GoLiveUpdateUrls {
68
69
70
public function success(){
71
?>
72
<div id="message" class="updated fade">
73
<p>
74
- <strong><?php _e( 'The URLS in the checked tables have been updated.', 'go-live-update-urls' ); ?></strong>
75
</p>
76
</div>
77
<?php
@@ -334,6 +342,11 @@ class GoLiveUpdateUrls {
334
335
//Go through each table sent to be updated
336
foreach( array_keys( $this->tables ) as $table ){
337
if( in_array( $table, array_keys( $serialized_tables ) ) ){
338
if( is_array( $serialized_tables[ $table ] ) ){
339
foreach( $serialized_tables[ $table ] as $column ){
54
$this->oldurl = trim( strip_tags( $_POST[ 'oldurl' ] ) );
55
$this->newurl = trim( strip_tags( $_POST[ 'newurl' ] ) );
56
57
+ //backward compatibility with Pro
58
+ if( empty( $_POST[ self::TABLE_INPUT_NAME ] ) ){
59
+ $this->tables = $_POST;
60
+ } else {
61
+ $this->tables = $_POST[ self::TABLE_INPUT_NAME ];
62
+ }
63
64
do_action( 'gluu-before-make-update', $this );
65
73
74
75
public function success(){
76
+ $message = apply_filters( 'go-live-update-urls-success-message', __( 'The URLS in the checked tables have been updated.', 'go-live-update-urls' ) );
77
?>
78
<div id="message" class="updated fade">
79
<p>
80
+ <strong>
81
+ <?php echo $message; ?>
82
+ </strong>
83
</p>
84
</div>
85
<?php
342
343
//Go through each table sent to be updated
344
foreach( array_keys( $this->tables ) as $table ){
345
+ //backward compatibility with pro
346
+ if( $table == 'submit' && $table == 'oldurl' && $table == 'newurl' ){
347
+ continue;
348
+ }
349
+
350
if( in_array( $table, array_keys( $serialized_tables ) ) ){
351
if( is_array( $serialized_tables[ $table ] ) ){
352
foreach( $serialized_tables[ $table ] as $column ){