How to Implement Script Modifications to Overcome Three Bugs in WordPress 2.9
Have you upgraded your own WordPress blog to version 2.9? What happened then? Yeah, many people complained about the schedule feature for the post did not work properly, as this is one of the advantage features in WordPress. I, myself, very often using this feature. After searching via Google, then I found a solution from this: WP 2.9: three bugs, and how to fix them. Driven by my curiosity, then I compared the three files that are the result of modifications to the original versions of that three files. Finally, I found which code should be changed. If you want to modify those three files, please do so by using the cPanel of your web hosting. Do not, I repeat: do not ever use the Editor features in the admin panel, since this Editor features looked like has the problem too in WordPress version 2.9. Be careful, as you will modify the WordPress core files itself!
-
Open your /wp-includes/class-simplepie.php, and find this code:
9438 9439 9440 9441 9442 9443 9444 9445 9446 9447
// This is last, as behaviour of this varies with OS userland and PHP version elseif (function_exists('iconv') && ($return = @iconv($input, $output, $data))) { return $return; } // If we can't do anything, just fail else { return false; }
then replace with this following code:
9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452
// This is last, as behaviour of this varies with OS userland and PHP version elseif (function_exists('iconv') && ($return = @iconv($input, $output, $data))) { return $return; } // allow crappy servers to at least convert UTF-8 to UTF-8 elseif ( $input == $output ) { return $data; } // If we can't do anything, just fail else { return false; }
-
Open your /wp-includes/default-widgets.php file, and find this code:
734 735 736
echo $after_widget; $rss->__destruct(); unset($rss);
then replace with this following code:
734 735 736 737
echo $after_widget; if ( !is_wp_error($rss) ) $rss->__destruct(); unset($rss);
-
Open your /wp-includes/http.php file, and find this code:
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308
// CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since // a value of 0 will allow an ulimited timeout. // Use _MS if available. if ( defined( 'CURLOPT_TIMEOUT_MS' ) ) { $timeout_ms = (int) ceil( 1000 * $r['timeout'] ); curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT_MS, $timeout_ms ); curl_setopt( $handle, CURLOPT_TIMEOUT_MS, $timeout_ms ); } else { $timeout = (int) ceil( $r['timeout'] ); curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout ); curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout ); }
then replace with this following code:
1297 1298 1299 1300 1301
// CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since // a value of 0 will allow an ulimited timeout. $timeout = (int) ceil( $r['timeout'] ); curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout ); curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout );
Good luck!
Print This Post
Recent Comments