WordPress.org

Make WordPress Core

Changeset 40652


Ignore:
Timestamp:
05/12/2017 05:11:17 PM (3 years ago)
Author:
afercia
Message:

Login and Registration: Add a filter to disable the initial auto-focus on the login screen.

Fixes #40301.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r40387 r40652  
    359359    /**
    360360     * Filters the message body of the password reset mail.
    361      * 
     361     *
    362362     * If the filtered message is empty, the password reset email will not be sent.
    363363     *
     
    965965}
    966966
    967 <?php if ( !$error ) { ?>
     967/**
     968 * Filters whether to print the call to `wp_attempt_focus()` on the login screen.
     969 *
     970 * @since 4.8.0
     971 *
     972 * @param bool $print Whether to print the function call. Default true.
     973 */
     974<?php if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) { ?>
    968975wp_attempt_focus();
    969976<?php } ?>
Note: See TracChangeset for help on using the changeset viewer.