Version Description
- Upgrade procedures (not currently used)
- Fixes a bug in WP 3.1.3 related to post_status array values
Download this release
Release Info
| Developer | markjaquith |
| Plugin | |
| Version | 0.5 |
| Comparing to | |
| See all releases | |
Code changes from version 0.4 to 0.5
- hotfix.php +35 -3
- readme.txt +14 -2
hotfix.php
CHANGED
|
@@ -2,17 +2,41 @@
|
|
| 2 |
/*
|
| 3 |
Plugin Name: Hotfix
|
| 4 |
Description: Provides "hotfixes" for selected WordPress bugs, so you don't have to wait for the next WordPress core release. Keep the plugin updated!
|
| 5 |
-
Version: 0.
|
| 6 |
Author: Mark Jaquith
|
| 7 |
Author URI: http://coveredwebservices.com/
|
| 8 |
*/
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
function wp_hotfix_init() {
|
| 11 |
global $wp_version;
|
| 12 |
|
| 13 |
$hotfixes = array();
|
| 14 |
|
| 15 |
switch ( $wp_version ) {
|
|
|
|
|
|
|
|
|
|
| 16 |
case '3.1' :
|
| 17 |
$hotfixes = array( '310_parsed_tax_query' );
|
| 18 |
break;
|
|
@@ -28,8 +52,6 @@ function wp_hotfix_init() {
|
|
| 28 |
}
|
| 29 |
}
|
| 30 |
|
| 31 |
-
add_action( 'init', 'wp_hotfix_init' );
|
| 32 |
-
|
| 33 |
/* And now, the hotfixes */
|
| 34 |
|
| 35 |
function wp_hotfix_305_comment_text_kses() {
|
|
@@ -46,3 +68,13 @@ function wp_hotfix_310_parsed_tax_query() {
|
|
| 46 |
@$q->parsed_tax_query = false; // Force it to be re-parsed.
|
| 47 |
return $q;
|
| 48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
/*
|
| 3 |
Plugin Name: Hotfix
|
| 4 |
Description: Provides "hotfixes" for selected WordPress bugs, so you don't have to wait for the next WordPress core release. Keep the plugin updated!
|
| 5 |
+
Version: 0.5
|
| 6 |
Author: Mark Jaquith
|
| 7 |
Author URI: http://coveredwebservices.com/
|
| 8 |
*/
|
| 9 |
|
| 10 |
+
// This bootstraps everything
|
| 11 |
+
WP_Hotfix_Controller::init();
|
| 12 |
+
|
| 13 |
+
class WP_Hotfix_Controller {
|
| 14 |
+
function init() {
|
| 15 |
+
add_action( 'init', 'wp_hotfix_init' );
|
| 16 |
+
register_activation_hook( __FILE__, array( __CLASS__, 'activate' ) );
|
| 17 |
+
register_deactivation_hook( __FILE__, array( __CLASS__, 'deactivate' ) );
|
| 18 |
+
}
|
| 19 |
+
function activate() {
|
| 20 |
+
add_option( 'hotfix_version', '1' );
|
| 21 |
+
register_uninstall_hook( __FILE__, array( __CLASS__, 'uninstall' ) );
|
| 22 |
+
}
|
| 23 |
+
function deactivate() {
|
| 24 |
+
delete_option( 'hotfix_version' );
|
| 25 |
+
}
|
| 26 |
+
function uninstall() {
|
| 27 |
+
self::deactivate(); // The same, for now
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
function wp_hotfix_init() {
|
| 32 |
global $wp_version;
|
| 33 |
|
| 34 |
$hotfixes = array();
|
| 35 |
|
| 36 |
switch ( $wp_version ) {
|
| 37 |
+
case '3.1.3' :
|
| 38 |
+
$hotfixes = array( '313_post_status_query_string' );
|
| 39 |
+
break;
|
| 40 |
case '3.1' :
|
| 41 |
$hotfixes = array( '310_parsed_tax_query' );
|
| 42 |
break;
|
| 52 |
}
|
| 53 |
}
|
| 54 |
|
|
|
|
|
|
|
| 55 |
/* And now, the hotfixes */
|
| 56 |
|
| 57 |
function wp_hotfix_305_comment_text_kses() {
|
| 68 |
@$q->parsed_tax_query = false; // Force it to be re-parsed.
|
| 69 |
return $q;
|
| 70 |
}
|
| 71 |
+
|
| 72 |
+
function wp_hotfix_313_post_status_query_string() {
|
| 73 |
+
add_filter( 'request', 'wp_hotfix_313_post_status_query_string_request' );
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
function wp_hotfix_313_post_status_query_string_request( $qvs ) {
|
| 77 |
+
if ( isset( $qvs['post_status'] ) && is_array( $qvs['post_status'] ) )
|
| 78 |
+
$qvs['post_status'] = implode( ',', $qvs['post_status'] );
|
| 79 |
+
return $qvs;
|
| 80 |
+
}
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: markjaquith
|
| 3 |
Tags: hotfix, bugs, wordpress, update
|
| 4 |
Requires at least: 3.0
|
| 5 |
-
Tested up to: 3.1
|
| 6 |
-
Stable tag: 0.
|
| 7 |
|
| 8 |
Provides unofficial fixes for selected WordPress bugs, so you don't have to wait for the next WordPress core release.
|
| 9 |
|
|
@@ -13,6 +13,9 @@ This unofficial plugin provides fixes for selected WordPress bugs, so you don't
|
|
| 13 |
|
| 14 |
Recent fixes:
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
* **WordPress 3.1**
|
| 17 |
* Fix a bug that caused some taxonomy query manipulations (like excluding categories) to not work like they did before.
|
| 18 |
|
|
@@ -34,6 +37,9 @@ Fixes are specific to your version of WordPress. It may be that your version of
|
|
| 34 |
Read the "Complete Hotfix List" section in the description. A later version of the plugin may list the hotfixes in a special WordPress admin page.
|
| 35 |
|
| 36 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
= 0.4 =
|
| 39 |
* Fix a bug in WP 3.1 that caused some taxonomy query manipulations (like excluding categories) to not work like they did before.
|
|
@@ -50,6 +56,9 @@ Read the "Complete Hotfix List" section in the description. A later version of t
|
|
| 50 |
* Hotfix for WP 3.0.5 comment text KSES overzealousness.
|
| 51 |
|
| 52 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
| 53 |
= 0.4 =
|
| 54 |
Upgrade if you're running WordPress 3.1 to fix a bug with taxonomy query manipulations.
|
| 55 |
|
|
@@ -61,6 +70,9 @@ Allows you to see safe HTML in the admin.
|
|
| 61 |
|
| 62 |
== Complete Hotfix List ==
|
| 63 |
|
|
|
|
|
|
|
|
|
|
| 64 |
* **WordPress 3.1**
|
| 65 |
* Fix a bug that caused some taxonomy query manipulations (like excluding categories) to not work like they did before.
|
| 66 |
|
| 2 |
Contributors: markjaquith
|
| 3 |
Tags: hotfix, bugs, wordpress, update
|
| 4 |
Requires at least: 3.0
|
| 5 |
+
Tested up to: 3.1.3
|
| 6 |
+
Stable tag: 0.5
|
| 7 |
|
| 8 |
Provides unofficial fixes for selected WordPress bugs, so you don't have to wait for the next WordPress core release.
|
| 9 |
|
| 13 |
|
| 14 |
Recent fixes:
|
| 15 |
|
| 16 |
+
* **WordPress 3.1.3**
|
| 17 |
+
* Fix a bug that caused `post_status` to malfunction if passed an array
|
| 18 |
+
|
| 19 |
* **WordPress 3.1**
|
| 20 |
* Fix a bug that caused some taxonomy query manipulations (like excluding categories) to not work like they did before.
|
| 21 |
|
| 37 |
Read the "Complete Hotfix List" section in the description. A later version of the plugin may list the hotfixes in a special WordPress admin page.
|
| 38 |
|
| 39 |
== Changelog ==
|
| 40 |
+
= 0.5 =
|
| 41 |
+
* Upgrade procedures (not currently used)
|
| 42 |
+
* Fixes a bug in WP 3.1.3 related to post_status array values
|
| 43 |
|
| 44 |
= 0.4 =
|
| 45 |
* Fix a bug in WP 3.1 that caused some taxonomy query manipulations (like excluding categories) to not work like they did before.
|
| 56 |
* Hotfix for WP 3.0.5 comment text KSES overzealousness.
|
| 57 |
|
| 58 |
== Upgrade Notice ==
|
| 59 |
+
= 0.5 =
|
| 60 |
+
Upgrade if you're having issues with WordPress 3.1.3.
|
| 61 |
+
|
| 62 |
= 0.4 =
|
| 63 |
Upgrade if you're running WordPress 3.1 to fix a bug with taxonomy query manipulations.
|
| 64 |
|
| 70 |
|
| 71 |
== Complete Hotfix List ==
|
| 72 |
|
| 73 |
+
* **WordPress 3.1.3**
|
| 74 |
+
* Fix a bug that caused `post_status` to malfunction if passed an array
|
| 75 |
+
|
| 76 |
* **WordPress 3.1**
|
| 77 |
* Fix a bug that caused some taxonomy query manipulations (like excluding categories) to not work like they did before.
|
| 78 |
|
