From 430422b0b7a3642cf6a793190180c0af3f760512 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Fri, 12 May 2017 17:12:46 +0000 Subject: [PATCH] Login and Registration: Add a filter to disable the initial auto-focus on the login screen. Fixes #40301. Built from https://develop.svn.wordpress.org/trunk@40652 git-svn-id: http://core.svn.wordpress.org/trunk@40515 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-login.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index da6f342547..ef9ede6d58 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40651'; +$wp_version = '4.8-alpha-40652'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-login.php b/wp-login.php index d21ce154fd..8d73c6538b 100644 --- a/wp-login.php +++ b/wp-login.php @@ -358,7 +358,7 @@ function retrieve_password() { /** * Filters the message body of the password reset mail. - * + * * If the filtered message is empty, the password reset email will not be sent. * * @since 2.8.0 @@ -964,7 +964,14 @@ d.select(); }, 200); } - +/** + * Filters whether to print the call to `wp_attempt_focus()` on the login screen. + * + * @since 4.8.0 + * + * @param bool $print Whether to print the function call. Default true. + */ + wp_attempt_focus(); if(typeof wpOnload=='function')wpOnload();