Use direct typecasting instead of intval() for better performance.

props kovshenin.
see #25788.

git-svn-id: https://develop.svn.wordpress.org/trunk@28823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-06-24 16:05:54 +00:00
parent a10aa6c53c
commit 94be170877

View File

@ -268,7 +268,7 @@ function wp_update_plugins( $extra_stats = array() ) {
$timeout = 30;
} else {
// Three seconds, plus one extra second for every 10 plugins
$timeout = 3 + intval( count( $plugins ) / 10 );
$timeout = 3 + (int) ( count( $plugins ) / 10 );
}
$options = array(
@ -423,7 +423,7 @@ function wp_update_themes( $extra_stats = array() ) {
$timeout = 30;
} else {
// Three seconds, plus one extra second for every 10 themes
$timeout = 3 + intval( count( $themes ) / 10 );
$timeout = 3 + (int) ( count( $themes ) / 10 );
}
$options = array(