Hotfix - Version 1.1

Version Description

  • Lets you update WordPress and install or update plugins and themes. (Only some Windows servers running IIS were affected.) You'll need to install this plugin manually.
Download this release

Release Info

Developer nacin
Plugin Icon wp plugin Hotfix
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

Files changed (2) hide show
  1. hotfix.php +23 -2
  2. readme.txt +14 -1
hotfix.php CHANGED
@@ -2,7 +2,7 @@
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: 1.0
6
  Author: Mark Jaquith
7
  Author URI: http://coveredwebservices.com/
8
  */
@@ -35,7 +35,7 @@ function wp_hotfix_init() {
35
 
36
  switch ( $wp_version ) {
37
  case '3.5' :
38
- $hotfixes = array( '350_twentytwelve' );
39
  break;
40
  case '3.4.2' :
41
  $hotfixes = array( '342_custom_fields' );
@@ -217,3 +217,24 @@ function wp_hotfix_350_twentytwelve_pre_http_request( $return, $args, $url ) {
217
  return wp_remote_post( $url, $args );
218
  }
219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 1.1
6
  Author: Mark Jaquith
7
  Author URI: http://coveredwebservices.com/
8
  */
35
 
36
  switch ( $wp_version ) {
37
  case '3.5' :
38
+ $hotfixes = array( '350_twentytwelve', '350_iis_http_failure' );
39
  break;
40
  case '3.4.2' :
41
  $hotfixes = array( '342_custom_fields' );
217
  return wp_remote_post( $url, $args );
218
  }
219
 
220
+ function wp_hotfix_350_iis_http_failure() {
221
+ add_filter( 'filesystem_method', 'wp_hotfix_350_iis_http_failure_define' );
222
+ }
223
+
224
+ function wp_hotfix_350_iis_http_failure_define( $filter ) {
225
+ if ( ! defined( 'WP_TEMP_DIR' ) )
226
+ define( 'WP_TEMP_DIR', wp_hotfix_350_iis_http_failure_get_temp_dir() );
227
+ remove_filter( 'filesystem_method', 'wp_hotfix_350_iis_http_failure_define' );
228
+ return $filter;
229
+ }
230
+
231
+ function wp_hotfix_350_iis_http_failure_get_temp_dir() {
232
+ $temp = ini_get('upload_tmp_dir');
233
+ if ( is_dir( $temp ) && @is_writable( $temp ) )
234
+ return trailingslashit( rtrim( $temp, '\\' ) );
235
+
236
+ $temp = WP_CONTENT_DIR . '/';
237
+ if ( is_dir( $temp ) && @is_writable( $temp ) )
238
+ return $temp;
239
+ return false;
240
+ }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: markjaquith, nacin
3
  Tags: hotfix, bugs, wordpress, update
4
  Requires at least: 3.0
5
  Tested up to: 3.5
6
- Stable tag: 1.0
7
 
8
  Provides unofficial fixes for selected WordPress bugs, so you don't have to wait for the next WordPress core release.
9
 
@@ -15,6 +15,7 @@ Recent fixes:
15
 
16
  * **WordPress 3.5**
17
  * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
 
18
 
19
  * **WordPress 3.4.2**
20
  * Fix adding and updating Custom Fields
@@ -27,6 +28,8 @@ Fixes are specific to your version of WordPress. It may be that your version of
27
 
28
  2. Done! Just remember to keep the plugin up to date!
29
 
 
 
30
  == Frequently Asked Questions ==
31
 
32
  = How do I know which hotfixes are being applied to my version? =
@@ -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
  = 1.0 =
38
  * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
39
 
@@ -69,6 +75,12 @@ Read the "Complete Hotfix List" section in the description. A later version of t
69
  * Hotfix for WP 3.0.5 comment text KSES overzealousness.
70
 
71
  == Upgrade Notice ==
 
 
 
 
 
 
72
  = 0.9 =
73
  Upgrade if you are having trouble with Custom Fields with WordPress 3.4.2.
74
 
@@ -93,6 +105,7 @@ Allows you to see safe HTML in the admin.
93
  == Complete Hotfix List ==
94
  * **WordPress 3.5**
95
  * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
 
96
 
97
  * **WordPress 3.4.2**
98
  * Fix adding and updating Custom Fields
3
  Tags: hotfix, bugs, wordpress, update
4
  Requires at least: 3.0
5
  Tested up to: 3.5
6
+ Stable tag: 1.1
7
 
8
  Provides unofficial fixes for selected WordPress bugs, so you don't have to wait for the next WordPress core release.
9
 
15
 
16
  * **WordPress 3.5**
17
  * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
18
+ * Lets you update WordPress and install or update plugins and themes. (Only some Windows servers running IIS were affected.) You'll need to [install this plugin manually](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
19
 
20
  * **WordPress 3.4.2**
21
  * Fix adding and updating Custom Fields
28
 
29
  2. Done! Just remember to keep the plugin up to date!
30
 
31
+ Or, you can do [a manual installation using FTP](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation), which may be necessary on certain Windows servers running IIS (WordPress 3.5 only).
32
+
33
  == Frequently Asked Questions ==
34
 
35
  = How do I know which hotfixes are being applied to my version? =
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
+ = 1.1 =
41
+ * Lets you update WordPress and install or update plugins and themes. (Only some Windows servers running IIS were affected.) You'll need to [install this plugin manually](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
42
+
43
  = 1.0 =
44
  * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
45
 
75
  * Hotfix for WP 3.0.5 comment text KSES overzealousness.
76
 
77
  == Upgrade Notice ==
78
+ = 1.1 =
79
+ Lets you update WordPress and install or update plugins and themes, which is broken on some Windows servers running IIS. (If you are affected, you will need to [update this plugin manually](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).)
80
+
81
+ = 1.0 =
82
+ * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
83
+
84
  = 0.9 =
85
  Upgrade if you are having trouble with Custom Fields with WordPress 3.4.2.
86
 
105
  == Complete Hotfix List ==
106
  * **WordPress 3.5**
107
  * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
108
+ * Lets you update WordPress and install or update plugins and themes. (Only some Windows servers running IIS were affected.) You'll need to [install this plugin manually](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
109
 
110
  * **WordPress 3.4.2**
111
  * Fix adding and updating Custom Fields