Version Description
- Fixed security issue
Download this release
Release Info
| Developer | freediver |
| Plugin | |
| Version | 2.9.1 |
| Comparing to | |
| See all releases | |
Code changes from version 2.9 to 2.9.1
- readme.txt +4 -1
- themedrive.php +10 -6
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: freediver
|
|
| 3 |
Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=920155875
|
| 4 |
Tags: theme, themes, admin, test
|
| 5 |
Requires at least: 2.3
|
| 6 |
-
Tested up to: 4.
|
| 7 |
Stable tag: trunk
|
| 8 |
|
| 9 |
Safely test drive any theme as an administrator, while visitors use the default one.
|
|
@@ -22,6 +22,9 @@ Plugin by Vladimir Prelovac. Managing more than one WordPress sites? Check out <
|
|
| 22 |
|
| 23 |
== Changelog ==
|
| 24 |
|
|
|
|
|
|
|
|
|
|
| 25 |
= 2.9 =
|
| 26 |
* WordPress 4.1 refresh and compatibility
|
| 27 |
|
| 3 |
Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=920155875
|
| 4 |
Tags: theme, themes, admin, test
|
| 5 |
Requires at least: 2.3
|
| 6 |
+
Tested up to: 4.3.1
|
| 7 |
Stable tag: trunk
|
| 8 |
|
| 9 |
Safely test drive any theme as an administrator, while visitors use the default one.
|
| 22 |
|
| 23 |
== Changelog ==
|
| 24 |
|
| 25 |
+
= 2.9.1 =
|
| 26 |
+
* Fixed security issue
|
| 27 |
+
|
| 28 |
= 2.9 =
|
| 29 |
* WordPress 4.1 refresh and compatibility
|
| 30 |
|
themedrive.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive
|
| 5 |
Description: Safely test drive any theme while visitors are using the default one. Includes instant theme preview via thumbnail.
|
| 6 |
Author: Vladimir Prelovac
|
| 7 |
-
Version: 2.9
|
| 8 |
Author URI: http://www.prelovac.com/vladimir/
|
| 9 |
|
| 10 |
To-Do:
|
|
@@ -15,7 +15,7 @@
|
|
| 15 |
|
| 16 |
// // // PLUGIN CODE // // //
|
| 17 |
|
| 18 |
-
$themedrive_localversion = "2.9";
|
| 19 |
|
| 20 |
$wp_themedrive_plugin_url = trailingslashit(plugins_url(null, __FILE__));
|
| 21 |
|
|
@@ -328,6 +328,10 @@
|
|
| 328 |
global $themedrive_localversion;
|
| 329 |
global $wp_themedrive_plugin_url;
|
| 330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
|
| 332 |
|
| 333 |
if ( isset( $_POST['button'] ) && 'Enable Theme Drive' == $_POST['button']) {
|
|
@@ -338,9 +342,9 @@
|
|
| 338 |
$access_level = (int)$_POST['access_level'];
|
| 339 |
update_option('td_level', $access_level);
|
| 340 |
$msg_status = "Theme Test Drive Enabled for administrator with " . $themedrive . ' theme.';
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
// Show message
|
| 345 |
echo '<div id="message" class="updated fade"><p>' . $msg_status . '</p></div>';
|
| 346 |
} elseif ( isset( $_POST['button'] ) && 'Disable Theme Drive' == $_POST['button'] ) {
|
|
@@ -441,7 +445,7 @@ Alternatively, disabling this plug-in should also do the trick.
|
|
| 441 |
<br>
|
| 442 |
<input class="button" type="submit" name="theme_install" value="Install theme »" class="button-primary" />
|
| 443 |
<br /><br />
|
| 444 |
-
|
| 445 |
|
| 446 |
</form>
|
| 447 |
|
| 4 |
Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive
|
| 5 |
Description: Safely test drive any theme while visitors are using the default one. Includes instant theme preview via thumbnail.
|
| 6 |
Author: Vladimir Prelovac
|
| 7 |
+
Version: 2.9.1
|
| 8 |
Author URI: http://www.prelovac.com/vladimir/
|
| 9 |
|
| 10 |
To-Do:
|
| 15 |
|
| 16 |
// // // PLUGIN CODE // // //
|
| 17 |
|
| 18 |
+
$themedrive_localversion = "2.9.1";
|
| 19 |
|
| 20 |
$wp_themedrive_plugin_url = trailingslashit(plugins_url(null, __FILE__));
|
| 21 |
|
| 328 |
global $themedrive_localversion;
|
| 329 |
global $wp_themedrive_plugin_url;
|
| 330 |
|
| 331 |
+
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !wp_verify_nonce(@$_POST['_wpnonce'], 'theme-drive')) {
|
| 332 |
+
wp_die('Nonce invalid. Please re-submit the form.');
|
| 333 |
+
exit;
|
| 334 |
+
}
|
| 335 |
|
| 336 |
|
| 337 |
if ( isset( $_POST['button'] ) && 'Enable Theme Drive' == $_POST['button']) {
|
| 342 |
$access_level = (int)$_POST['access_level'];
|
| 343 |
update_option('td_level', $access_level);
|
| 344 |
$msg_status = "Theme Test Drive Enabled for administrator with " . $themedrive . ' theme.';
|
| 345 |
+
|
| 346 |
+
|
| 347 |
+
|
| 348 |
// Show message
|
| 349 |
echo '<div id="message" class="updated fade"><p>' . $msg_status . '</p></div>';
|
| 350 |
} elseif ( isset( $_POST['button'] ) && 'Disable Theme Drive' == $_POST['button'] ) {
|
| 445 |
<br>
|
| 446 |
<input class="button" type="submit" name="theme_install" value="Install theme »" class="button-primary" />
|
| 447 |
<br /><br />
|
| 448 |
+
|
| 449 |
|
| 450 |
</form>
|
| 451 |
|
