Version Description
- Support updating URL with URL encoded characters.
- Tested to WordPress 5.8.2.
Download this release
Release Info
Developer | Mat Lipe |
Plugin | Go Live Update URLS |
Version | 6.3.4 |
Comparing to | |
See all releases |
Code changes from version 6.3.3 to 6.3.4
- go-live-update-urls.php +3 -4
- readme.txt +6 -2
- src/Admin.php +6 -3
- src/Core.php +20 -2
- src/Updaters/Url_Encoded.php +1 -3
go-live-update-urls.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Updates all the Urls in the database to point to a new URL when making your site live or changing domains.
|
6 |
* Author: OnPoint Plugins
|
7 |
* Author URI: https://onpointplugins.com/
|
8 |
-
* Version: 6.3.
|
9 |
* Text Domain: go-live-update-urls
|
10 |
* Domain Path: /languages/
|
11 |
* Network: false
|
@@ -15,8 +15,8 @@
|
|
15 |
* @package go-live-update-urls
|
16 |
*/
|
17 |
|
18 |
-
define( 'GO_LIVE_UPDATE_URLS_VERSION', '6.3.
|
19 |
-
define( 'GO_LIVE_UPDATE_URLS_REQUIRED_PRO_VERSION', '6.
|
20 |
define( 'GO_LIVE_UPDATE_URLS_URL', plugin_dir_url( __FILE__ ) );
|
21 |
|
22 |
use Go_Live_Update_Urls\Admin;
|
@@ -94,4 +94,3 @@ function go_live_update_urls_pro_plugin_notice() {
|
|
94 |
</div>
|
95 |
<?php
|
96 |
}
|
97 |
-
|
5 |
* Description: Updates all the Urls in the database to point to a new URL when making your site live or changing domains.
|
6 |
* Author: OnPoint Plugins
|
7 |
* Author URI: https://onpointplugins.com/
|
8 |
+
* Version: 6.3.4
|
9 |
* Text Domain: go-live-update-urls
|
10 |
* Domain Path: /languages/
|
11 |
* Network: false
|
15 |
* @package go-live-update-urls
|
16 |
*/
|
17 |
|
18 |
+
define( 'GO_LIVE_UPDATE_URLS_VERSION', '6.3.4' );
|
19 |
+
define( 'GO_LIVE_UPDATE_URLS_REQUIRED_PRO_VERSION', '6.4.0' );
|
20 |
define( 'GO_LIVE_UPDATE_URLS_URL', plugin_dir_url( __FILE__ ) );
|
21 |
|
22 |
use Go_Live_Update_Urls\Admin;
|
94 |
</div>
|
95 |
<?php
|
96 |
}
|
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: urls, launching, site changes, tools, domain, domains, domain changes, url
|
|
5 |
Requires at least: 5.2.0
|
6 |
Tested up to: 5.8.2
|
7 |
Requires PHP: 5.6.0
|
8 |
-
Stable tag: 6.3.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -13,7 +13,7 @@ Goes through entire site and replaces all instances of an old URL with a new one
|
|
13 |
|
14 |
<strong>Check out <a href="https://onpointplugins.com/product/go-live-update-urls-pro/" target="_blank">Go Live Update Urls PRO</a> for more features including support for tables created by plugins, the ability to test a URL before updating, update history, real time reporting, priority support, and so much more!</strong>
|
15 |
|
16 |
-
<blockquote><a href=" https://onpointplugins.com/go-live-update-urls/go-live-update-urls-pro-usage/#url-counting" target="_blank">
|
17 |
|
18 |
|
19 |
<h3>Features</h3>
|
@@ -102,6 +102,10 @@ If you wish to try to update tables mentioned as "not safe" anyway, you may make
|
|
102 |
3. Update prevented due to incomplete data entered.
|
103 |
|
104 |
== Changelog ==
|
|
|
|
|
|
|
|
|
105 |
= 6.3.3 =
|
106 |
* Improved capitalization across plugin verbiage.
|
107 |
* Improved translations.
|
5 |
Requires at least: 5.2.0
|
6 |
Tested up to: 5.8.2
|
7 |
Requires PHP: 5.6.0
|
8 |
+
Stable tag: 6.3.4
|
9 |
|
10 |
== Description ==
|
11 |
|
13 |
|
14 |
<strong>Check out <a href="https://onpointplugins.com/product/go-live-update-urls-pro/" target="_blank">Go Live Update Urls PRO</a> for more features including support for tables created by plugins, the ability to test a URL before updating, update history, real time reporting, priority support, and so much more!</strong>
|
15 |
|
16 |
+
<blockquote><a href=" https://onpointplugins.com/go-live-update-urls/go-live-update-urls-pro-usage/#url-counting" target="_blank">PRO version 6.4.0</a> is now available with real time reporting of urls, which will be and were updated!</blockquote>
|
17 |
|
18 |
|
19 |
<h3>Features</h3>
|
102 |
3. Update prevented due to incomplete data entered.
|
103 |
|
104 |
== Changelog ==
|
105 |
+
= 6.3.4 =
|
106 |
+
* Support updating URL with URL encoded characters.
|
107 |
+
* Tested to WordPress 5.8.2.
|
108 |
+
|
109 |
= 6.3.3 =
|
110 |
* Improved capitalization across plugin verbiage.
|
111 |
* Improved translations.
|
src/Admin.php
CHANGED
@@ -49,14 +49,17 @@ class Admin {
|
|
49 |
return;
|
50 |
}
|
51 |
|
52 |
-
$old_url =
|
53 |
-
$new_url =
|
54 |
if ( empty( $old_url ) || empty( $new_url ) || empty( $_POST[ self::TABLE_INPUT_NAME ] ) ) {
|
55 |
$this->failure_message();
|
56 |
return;
|
57 |
}
|
58 |
|
59 |
-
$tables =
|
|
|
|
|
|
|
60 |
|
61 |
do_action( 'go-live-update-urls/admin-page/before-update', $old_url, $new_url, $tables );
|
62 |
|
49 |
return;
|
50 |
}
|
51 |
|
52 |
+
$old_url = Core::instance()->sanitize_field( $_POST[ self::OLD_URL ] ); //phpcs:ignore
|
53 |
+
$new_url = Core::instance()->sanitize_field( $_POST[ self::NEW_URL ] ); //phpcs:ignore
|
54 |
if ( empty( $old_url ) || empty( $new_url ) || empty( $_POST[ self::TABLE_INPUT_NAME ] ) ) {
|
55 |
$this->failure_message();
|
56 |
return;
|
57 |
}
|
58 |
|
59 |
+
$tables = \array_filter( \array_map( [
|
60 |
+
Core::instance(),
|
61 |
+
'sanitize_field',
|
62 |
+
], (array) $_POST[ self::TABLE_INPUT_NAME ] ) ); //phpcs:ignore
|
63 |
|
64 |
do_action( 'go-live-update-urls/admin-page/before-update', $old_url, $new_url, $tables );
|
65 |
|
src/Core.php
CHANGED
@@ -48,7 +48,7 @@ class Core {
|
|
48 |
|
49 |
|
50 |
/**
|
51 |
-
* Flush any known caches which are affected by updating the database.
|
52 |
*
|
53 |
* 1. WP core object cache.
|
54 |
* 2. Elementor CSS cache.
|
@@ -60,7 +60,7 @@ class Core {
|
|
60 |
* @since 6.2.1
|
61 |
*/
|
62 |
public function flush_caches() {
|
63 |
-
// Special
|
64 |
$method = get_option( 'elementor_css_print_method' );
|
65 |
do_action( 'update_option_elementor_css_print_method', $method, $method, 'elementor_css_print_method' );
|
66 |
|
@@ -82,6 +82,24 @@ class Core {
|
|
82 |
}
|
83 |
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
/**
|
86 |
* Quick and dirty update of entire blog
|
87 |
*
|
48 |
|
49 |
|
50 |
/**
|
51 |
+
* Flush any known caches, which are affected by updating the database.
|
52 |
*
|
53 |
* 1. WP core object cache.
|
54 |
* 2. Elementor CSS cache.
|
60 |
* @since 6.2.1
|
61 |
*/
|
62 |
public function flush_caches() {
|
63 |
+
// Special flushing of CSS cache for Elementor #7751.
|
64 |
$method = get_option( 'elementor_css_print_method' );
|
65 |
do_action( 'update_option_elementor_css_print_method', $method, $method, 'elementor_css_print_method' );
|
66 |
|
82 |
}
|
83 |
|
84 |
|
85 |
+
/**
|
86 |
+
* Like `sanitize_text_field` except we don't remove
|
87 |
+
* URL encoded characters and HTML tags.
|
88 |
+
*
|
89 |
+
* @param string $value - User provided value to sanitize.
|
90 |
+
*
|
91 |
+
* @since 6.3.4
|
92 |
+
*
|
93 |
+
* @return string
|
94 |
+
*/
|
95 |
+
public function sanitize_field( $value ) {
|
96 |
+
$filtered = wp_unslash( (string) $value );
|
97 |
+
$filtered = wp_check_invalid_utf8( $filtered );
|
98 |
+
$filtered = \preg_replace( '/[\r\n\t ]+/', ' ', $filtered );
|
99 |
+
return \trim( $filtered );
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
/**
|
104 |
* Quick and dirty update of entire blog
|
105 |
*
|
src/Updaters/Url_Encoded.php
CHANGED
@@ -3,8 +3,6 @@
|
|
3 |
namespace Go_Live_Update_Urls\Updaters;
|
4 |
|
5 |
/**
|
6 |
-
* URL Encoded
|
7 |
-
*
|
8 |
* Url encoded Urls have special characters in place of typically entered
|
9 |
* characters. This replaces standard characters with their encoded versions
|
10 |
* during updating.
|
@@ -27,7 +25,7 @@ class Url_Encoded extends Updaters_Abstract {
|
|
27 |
|
28 |
/**
|
29 |
* Update the old encoded URL with the new encoded URL if the entered
|
30 |
-
* old URL is different
|
31 |
*
|
32 |
* @return int
|
33 |
*/
|
3 |
namespace Go_Live_Update_Urls\Updaters;
|
4 |
|
5 |
/**
|
|
|
|
|
6 |
* Url encoded Urls have special characters in place of typically entered
|
7 |
* characters. This replaces standard characters with their encoded versions
|
8 |
* during updating.
|
25 |
|
26 |
/**
|
27 |
* Update the old encoded URL with the new encoded URL if the entered
|
28 |
+
* old URL is different from the encoded version.
|
29 |
*
|
30 |
* @return int
|
31 |
*/
|