Initialise Variables, Whitespace cleanup, Remove unused variables, Cast start_of_week option to int in sanitization.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-02-13 06:08:15 +00:00
parent 5e339cea52
commit 22e4b1200e
3 changed files with 5 additions and 3 deletions

View File

@ -464,6 +464,8 @@ class Plugin_Upgrader extends WP_Upgrader {
$this->maintenance_mode(true);
$results = array();
$all = count($plugins);
$i = 1;
foreach ( $plugins as $plugin ) {

View File

@ -1374,7 +1374,6 @@ function make_clickable($ret) {
* @return string Converted content.
*/
function wp_rel_nofollow( $text ) {
global $wpdb;
// This is a pre save filter, so text is already escaped.
$text = stripslashes($text);
$text = preg_replace_callback('|<a (.+?)>|i', 'wp_rel_nofollow_callback', $text);
@ -2470,6 +2469,7 @@ function sanitize_option($option, $value) {
case 'comments_per_page':
case 'thread_comments_depth':
case 'users_can_register':
case 'start_of_week':
$value = absint( $value );
break;

View File

@ -2365,8 +2365,8 @@ class WP_Query {
foreach ( $stickies as $sticky_post ) {
if ( 'publish' != $sticky_post->post_status )
continue;
array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
$sticky_offset++;
array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
$sticky_offset++;
}
}
}