Initialise Variables, Whitespace cleanup, Remove unused variables, Cast start_of_week option to int in sanitization.
git-svn-id: https://develop.svn.wordpress.org/trunk@13089 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6f5ca5962f
commit
d5ced26371
@ -464,6 +464,8 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
$this->maintenance_mode(true);
|
$this->maintenance_mode(true);
|
||||||
|
|
||||||
|
$results = array();
|
||||||
|
|
||||||
$all = count($plugins);
|
$all = count($plugins);
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach ( $plugins as $plugin ) {
|
foreach ( $plugins as $plugin ) {
|
||||||
|
@ -1374,7 +1374,6 @@ function make_clickable($ret) {
|
|||||||
* @return string Converted content.
|
* @return string Converted content.
|
||||||
*/
|
*/
|
||||||
function wp_rel_nofollow( $text ) {
|
function wp_rel_nofollow( $text ) {
|
||||||
global $wpdb;
|
|
||||||
// This is a pre save filter, so text is already escaped.
|
// This is a pre save filter, so text is already escaped.
|
||||||
$text = stripslashes($text);
|
$text = stripslashes($text);
|
||||||
$text = preg_replace_callback('|<a (.+?)>|i', 'wp_rel_nofollow_callback', $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 'comments_per_page':
|
||||||
case 'thread_comments_depth':
|
case 'thread_comments_depth':
|
||||||
case 'users_can_register':
|
case 'users_can_register':
|
||||||
|
case 'start_of_week':
|
||||||
$value = absint( $value );
|
$value = absint( $value );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2365,8 +2365,8 @@ class WP_Query {
|
|||||||
foreach ( $stickies as $sticky_post ) {
|
foreach ( $stickies as $sticky_post ) {
|
||||||
if ( 'publish' != $sticky_post->post_status )
|
if ( 'publish' != $sticky_post->post_status )
|
||||||
continue;
|
continue;
|
||||||
array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
|
array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
|
||||||
$sticky_offset++;
|
$sticky_offset++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user