Login and registration: Add a filter to allow to disable the Login screen language dropdown.
This change introduces the `display_login_language_dropdown` filter which allows to disable the Login screen language dropdown. Follow-up to [52058]. Props rickcurran, audrasjb, ocean90, hellofromtonya, costdev, johnbillion. Fixes #54675. Built from https://develop.svn.wordpress.org/trunk@52404 git-svn-id: http://core.svn.wordpress.org/trunk@51996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e6b9b96130
commit
d0b3567730
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-beta3-52403';
|
||||
$wp_version = '5.9-beta3-52404';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
19
wp-login.php
19
wp-login.php
|
@ -312,11 +312,21 @@ function login_footer( $input_id = '' ) {
|
|||
</div><?php // End of <div id="login">. ?>
|
||||
|
||||
<?php
|
||||
if (
|
||||
! $interim_login &&
|
||||
/**
|
||||
* Filters the Languages select input activation on the login screen.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param bool Whether to display the Languages select input on the login screen.
|
||||
*/
|
||||
apply_filters( 'display_login_language_dropdown', true )
|
||||
) {
|
||||
$languages = get_available_languages();
|
||||
|
||||
if ( ! empty( $languages ) && ! $interim_login ) {
|
||||
if ( ! empty( $languages ) ) {
|
||||
?>
|
||||
|
||||
<div class="language-switcher">
|
||||
<form id="language-switcher" action="" method="get">
|
||||
|
||||
|
@ -361,9 +371,8 @@ function login_footer( $input_id = '' ) {
|
|||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php
|
||||
|
||||
if ( ! empty( $input_id ) ) {
|
||||
|
|
Loading…
Reference in New Issue