From ea175a054bad1b99c311648712660974d270445e Mon Sep 17 00:00:00 2001 From: Ustimenko Alexander Date: Tue, 11 Nov 2014 01:39:25 +0700 Subject: [PATCH 1/2] Fix tests preview mode --- src/Doer/PostBrowser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Doer/PostBrowser.php b/src/Doer/PostBrowser.php index a3f42cab..3766e434 100644 --- a/src/Doer/PostBrowser.php +++ b/src/Doer/PostBrowser.php @@ -10,7 +10,7 @@ class WpTesting_Doer_PostBrowser extends WpTesting_Doer_AbstractDoer */ public function addTestsToQuery($query) { - if (!$this->wp->isQueryMain($query)) { + if (!$this->wp->isQueryMain($query) || $query->is_preview()) { return; } From 4b9d30e5acd34989d64214e19bb62a46daa3515d Mon Sep 17 00:00:00 2001 From: Ustimenko Alexander Date: Tue, 11 Nov 2014 01:39:59 +0700 Subject: [PATCH 2/2] Update changelog and bump version to 0.4.1 --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- wp-testing.php | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15c438da..bd08b859 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ ## Changelog ## + +### 0.4.1 ### +Fix tests preview mode + +* Not changing main WP query when in preview + + ### 0.4 ### Display tests in blog everywhere same as posts @@ -111,6 +118,9 @@ Initial release == Upgrade Notice == +### 0.4.1 ### +Fix tests preview mode + ### 0.3 ### Plugin now more stable under WP 3.2 to latest and PHP from 5.2 to 5.5 diff --git a/README.md b/README.md index c4f38f91..3476515b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ **Tags:** psychological, testing, test, quiz **Requires at least:** 3.2 **Tested up to:** 3.9 -**Stable tag:** 0.4 +**Stable tag:** 0.4.1 **License:** GPLv3 **License URI:** http://www.gnu.org/licenses/gpl-3.0.html diff --git a/wp-testing.php b/wp-testing.php index 513ba13e..3823bbae 100644 --- a/wp-testing.php +++ b/wp-testing.php @@ -3,7 +3,7 @@ * Plugin Name: Wp-testing * Plugin URI: http://wordpress.org/extend/plugins/wp-testing/ * Description: Helps to create psychological tests. - * Version: 0.4 + * Version: 0.4.1 * Author: Alexander Ustimenko * Author URI: http://ustimen.co * License: GPL3