mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 04:25:07 +00:00
Avoid function calls on each iteration of a for
loop.
See #30799. Built from https://develop.svn.wordpress.org/trunk@31678 git-svn-id: http://core.svn.wordpress.org/trunk@31659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6aff223ffb
commit
b4869ed42f
@ -1759,7 +1759,7 @@ function rawurlencode_deep( $value ) {
|
|||||||
*/
|
*/
|
||||||
function antispambot( $email_address, $hex_encoding = 0 ) {
|
function antispambot( $email_address, $hex_encoding = 0 ) {
|
||||||
$email_no_spam_address = '';
|
$email_no_spam_address = '';
|
||||||
for ( $i = 0; $i < strlen( $email_address ); $i++ ) {
|
for ( $i = 0, $len = strlen( $email_address ); $i < $len; $i++ ) {
|
||||||
$j = rand( 0, 1 + $hex_encoding );
|
$j = rand( 0, 1 + $hex_encoding );
|
||||||
if ( $j == 0 ) {
|
if ( $j == 0 ) {
|
||||||
$email_no_spam_address .= '&#' . ord( $email_address[$i] ) . ';';
|
$email_no_spam_address .= '&#' . ord( $email_address[$i] ) . ';';
|
||||||
|
@ -479,7 +479,7 @@ function do_action($tag, $arg = '') {
|
|||||||
$args[] =& $arg[0];
|
$args[] =& $arg[0];
|
||||||
else
|
else
|
||||||
$args[] = $arg;
|
$args[] = $arg;
|
||||||
for ( $a = 2; $a < func_num_args(); $a++ )
|
for ( $a = 2, $num = func_num_args(); $a < $num; $a++ )
|
||||||
$args[] = func_get_arg($a);
|
$args[] = func_get_arg($a);
|
||||||
|
|
||||||
// Sort
|
// Sort
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-alpha-31677';
|
$wp_version = '4.2-alpha-31678';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user