diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c38e56adb7..b048db3836 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -4128,6 +4128,7 @@ function _search_terms_tidy($t) { * * Useful for returning true to filters easily * + * @since 3.0.0 * @see __return_false() * @return bool true */ @@ -4140,6 +4141,7 @@ function __return_true() { * * Useful for returning false to filters easily * + * @since 3.0.0 * @see __return_true() * @return bool false */ @@ -4147,6 +4149,19 @@ function __return_false() { return false; } +/** + * Returns 0 + * + * Useful for returning 0 to filters easily + * + * @since 3.0.0 + * @see __return_zero() + * @return int 0 + */ +function __return_zero() { + return 0; +} + /** * Send a HTTP header to disable content type sniffing in browsers which support it. * diff --git a/wp-login.php b/wp-login.php index b6b11a429a..c9756a3aef 100644 --- a/wp-login.php +++ b/wp-login.php @@ -42,7 +42,7 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') { global $error, $is_iphone, $interim_login, $current_site; // Don't index any of these forms - add_filter( 'pre_option_blog_public', create_function( '$a', 'return 0;' ) ); + add_filter( 'pre_option_blog_public', '__return_zero' ); add_action( 'login_head', 'noindex' ); if ( empty($wp_error) )