Login and Registration: Prevent the enable_login_autofocus filter DocBlock from spilling into JS code.

Props chris@vendiadvertising.com.
Fixes #41176.
Built from https://develop.svn.wordpress.org/trunk@40954


git-svn-id: http://core.svn.wordpress.org/trunk@40804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2017-06-26 20:37:42 +00:00
parent 5650910c50
commit 62947553c5
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9-alpha-40953'; $wp_version = '4.9-alpha-40954';
/** /**
* 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.

View File

@ -964,6 +964,7 @@ d.select();
}, 200); }, 200);
} }
<?php
/** /**
* Filters whether to print the call to `wp_attempt_focus()` on the login screen. * Filters whether to print the call to `wp_attempt_focus()` on the login screen.
* *
@ -971,7 +972,7 @@ d.select();
* *
* @param bool $print Whether to print the function call. Default true. * @param bool $print Whether to print the function call. Default true.
*/ */
<?php if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) { ?> if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) { ?>
wp_attempt_focus(); wp_attempt_focus();
<?php } ?> <?php } ?>
if(typeof wpOnload=='function')wpOnload(); if(typeof wpOnload=='function')wpOnload();