mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 05:10:18 +00:00
Avoid function calls on each iteration of a for loop.
See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@31678 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1759,7 +1759,7 @@ function rawurlencode_deep( $value ) {
|
||||
*/
|
||||
function antispambot( $email_address, $hex_encoding = 0 ) {
|
||||
$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 );
|
||||
if ( $j == 0 ) {
|
||||
$email_no_spam_address .= '&#' . ord( $email_address[$i] ) . ';';
|
||||
|
||||
Reference in New Issue
Block a user