Version Description
- security fix (Thanks for reporting!)
- testet up to WordPress 5.9
- Donation link in readme.txt updatet. Thanks for your support!
Download this release
Release Info
Developer | Reisetiger |
Plugin | WP Downgrade | Specific Core Version |
Version | 1.2.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.2.3
- readme.txt +9 -3
- wp-downgrade.php +15 -4
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== WP Downgrade | Specific Core Version ===
|
2 |
Contributors: Reisetiger
|
3 |
-
Donate link: https://www.
|
4 |
Tags: Downgrade, Core, WP-Core, Version, Rollback, Upgrade, Update, Release, Versionskontrolle
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to: 5.
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -51,6 +51,8 @@ Ich stelle das Plugin kostenlos zur Verfügung, freue mich aber sehr üb
|
|
51 |
5. Nun findest du unter "Einstellungen" einen neuen Punkt namens "WP Downgrade". Dort kannst du die gewünschte Core-Versionsnummer hinterlegen und anschließend das WordPress-Update vornehmen.
|
52 |
|
53 |
|
|
|
|
|
54 |
= Q: Button for update/reinstall is not visible =
|
55 |
A: If there is no button for update/reinstall core on /wp-admin/update-core.php, this is being blocked by a custom code. Can be another plugin or your theme. Maybe you try something like this:
|
56 |
|
@@ -63,7 +65,6 @@ A: If there is no button for update/reinstall core on /wp-admin/update-core.php,
|
|
63 |
7. Remove "gd-system-plugin" from `/wp-content/mu-plugins/`
|
64 |
8. Remove the reference to `gd-config.php` in wp-config.php.
|
65 |
|
66 |
-
|
67 |
== Screenshots ==
|
68 |
|
69 |
1. Release-Nummer hinterlegen
|
@@ -72,6 +73,11 @@ A: If there is no button for update/reinstall core on /wp-admin/update-core.php,
|
|
72 |
|
73 |
|
74 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
75 |
= 1.2.2 =
|
76 |
* compatibility with WordPress 5.5.1
|
77 |
* Donation link added. I am very pleased with a coffee or a beer!
|
1 |
=== WP Downgrade | Specific Core Version ===
|
2 |
Contributors: Reisetiger
|
3 |
+
Donate link: https://www.reisetiger.net/spenden-wp-plugins/
|
4 |
Tags: Downgrade, Core, WP-Core, Version, Rollback, Upgrade, Update, Release, Versionskontrolle
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 5.9
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
51 |
5. Nun findest du unter "Einstellungen" einen neuen Punkt namens "WP Downgrade". Dort kannst du die gewünschte Core-Versionsnummer hinterlegen und anschließend das WordPress-Update vornehmen.
|
52 |
|
53 |
|
54 |
+
== Frequently Asked Questions ==
|
55 |
+
|
56 |
= Q: Button for update/reinstall is not visible =
|
57 |
A: If there is no button for update/reinstall core on /wp-admin/update-core.php, this is being blocked by a custom code. Can be another plugin or your theme. Maybe you try something like this:
|
58 |
|
65 |
7. Remove "gd-system-plugin" from `/wp-content/mu-plugins/`
|
66 |
8. Remove the reference to `gd-config.php` in wp-config.php.
|
67 |
|
|
|
68 |
== Screenshots ==
|
69 |
|
70 |
1. Release-Nummer hinterlegen
|
73 |
|
74 |
|
75 |
== Changelog ==
|
76 |
+
= 1.2.3 =
|
77 |
+
* security fix (Thanks for reporting!)
|
78 |
+
* testet up to WordPress 5.9
|
79 |
+
* Donation link in readme.txt updatet. Thanks for your support!
|
80 |
+
|
81 |
= 1.2.2 =
|
82 |
* compatibility with WordPress 5.5.1
|
83 |
* Donation link added. I am very pleased with a coffee or a beer!
|
wp-downgrade.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Downgrade | Specific Core Version
|
4 |
Plugin URI: https://www.reisetiger.net
|
5 |
Description: WP Downgrade allows you to either downgrade or update WordPress Core to an arbitrary version of your choice. The version you choose is downloaded directly from wordpress.org and installed just like any regular release update. The target version WordPress allows you to update to remains constant until you enter a different one or deactivate the plugin either completely or by leaving the target version field empty.
|
6 |
-
Version: 1.2.
|
7 |
Author: Reisetiger
|
8 |
Author URI: https://www.reisetiger.net
|
9 |
License: GPL2
|
@@ -35,12 +35,23 @@ function wp_downgrade_create_menu() {
|
|
35 |
|
36 |
function register_wp_downgrade_settings() {
|
37 |
//register our settings
|
38 |
-
register_setting( 'wpdg-settings-group', 'wpdg_specific_version_name' );
|
39 |
-
register_setting( 'wpdg-settings-group', 'wpdg_download_url' );
|
40 |
-
register_setting( 'wpdg-settings-group', 'wpdg_edit_download_url' );
|
41 |
// register_setting( 'wpdg-settings-group', 'some_other_option' );
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'wp_downgrade_action_links' );
|
45 |
function wp_downgrade_action_links( $links ) {
|
46 |
$links[] = '<a href="'. esc_url( get_admin_url(null, 'options-general.php?page=wp_downgrade') ) .'">Settings</a>';
|
3 |
Plugin Name: WP Downgrade | Specific Core Version
|
4 |
Plugin URI: https://www.reisetiger.net
|
5 |
Description: WP Downgrade allows you to either downgrade or update WordPress Core to an arbitrary version of your choice. The version you choose is downloaded directly from wordpress.org and installed just like any regular release update. The target version WordPress allows you to update to remains constant until you enter a different one or deactivate the plugin either completely or by leaving the target version field empty.
|
6 |
+
Version: 1.2.3
|
7 |
Author: Reisetiger
|
8 |
Author URI: https://www.reisetiger.net
|
9 |
License: GPL2
|
35 |
|
36 |
function register_wp_downgrade_settings() {
|
37 |
//register our settings
|
38 |
+
register_setting( 'wpdg-settings-group', 'wpdg_specific_version_name', array('sanitize_callback' => 'wp_downgrade_sanitize_version') );
|
39 |
+
register_setting( 'wpdg-settings-group', 'wpdg_download_url', array('sanitize_callback' => 'sanitize_url') );
|
40 |
+
register_setting( 'wpdg-settings-group', 'wpdg_edit_download_url', array('sanitize_callback' => 'sanitize_url') );
|
41 |
// register_setting( 'wpdg-settings-group', 'some_other_option' );
|
42 |
}
|
43 |
|
44 |
+
function wp_downgrade_sanitize_version($userstring)
|
45 |
+
// Sicherstellen, dass eine plausible Versionsnummer eingegeben wurde (andernfalls Sicherheitsrisiko). Ein 'sanitize_text_field' oder sowas w�rde ggf. auch reichen, aber so pr�fen wir genauer, dass der Input wirklich zum pattern passt.
|
46 |
+
{
|
47 |
+
if (!preg_match("/^[-+]?[0-9]*[.]?[0-9]?[.]?[0-9]+$/", $userstring) AND $userstring !== ''){
|
48 |
+
add_settings_error('prefix_messages', 'wpdg_message', __('Version number looks strange.', 'wp-downgrade'), 'error');
|
49 |
+
return;
|
50 |
+
} else {
|
51 |
+
return $userstring;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'wp_downgrade_action_links' );
|
56 |
function wp_downgrade_action_links( $links ) {
|
57 |
$links[] = '<a href="'. esc_url( get_admin_url(null, 'options-general.php?page=wp_downgrade') ) .'">Settings</a>';
|