From 8ab52911d83c73c8abd5b3fff2d6aca12f079ad0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 26 Jun 2017 20:36:28 +0000 Subject: [PATCH] Login and Registration: Prevent the `enable_login_autofocus` filter DocBlock from spilling into JS code. Props chris@vendiadvertising.com. Fixes #41176. git-svn-id: https://develop.svn.wordpress.org/trunk@40954 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-login.php b/src/wp-login.php index 8d73c6538b..6c5769c4ef 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -964,6 +964,7 @@ d.select(); }, 200); } + +if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) { ?> wp_attempt_focus(); if(typeof wpOnload=='function')wpOnload();