Changeset 52058 for trunk/src/wp-login.php
- Timestamp:
- 11/08/2021 10:36:11 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r51955 r52058 313 313 314 314 <?php 315 $languages = get_available_languages(); 316 317 if ( ! empty( $languages ) && ! $interim_login ) { ?> 318 319 <div class="language-switcher"> 320 <form id="language-switcher" action="" method="get"> 321 322 <label for="language-switcher-locales"> 323 <span class="dashicons dashicons-translation" aria-hidden="true"></span> 324 <span class="screen-reader-text"><?php _e( 'Language' ); ?></span> 325 </label> 326 327 <?php 328 $args = array( 329 'id' => 'language-switcher-locales', 330 'name' => 'wp_lang', 331 'selected' => determine_locale(), 332 'show_available_translations' => false, 333 'explicit_option_en_us' => true, 334 'languages' => $languages, 335 ); 336 337 /** 338 * Filters default arguments for the Languages select input on the login screen. 339 * 340 * @since 5.9.0 341 * 342 * @param array $args Arguments for the Languages select input on the login screen. 343 */ 344 wp_dropdown_languages( apply_filters( 'wp_login_language_switcher_args', $args ) ); 345 ?> 346 347 <?php if ( $interim_login ) { ?> 348 <input type="hidden" name="interim-login" value="1" /> 349 <?php } ?> 350 351 <?php if ( isset( $_GET['redirect_to'] ) && '' !== $_GET['redirect_to'] ) { ?> 352 <input type="hidden" name="redirect_to" value="<?php echo esc_url_raw( $_GET['redirect_to'] ); ?>" /> 353 <?php } ?> 354 355 <?php if ( isset( $_GET['action'] ) && '' !== $_GET['action'] ) { ?> 356 <input type="hidden" name="action" value="<?php echo esc_attr( $_GET['action'] ); ?>" /> 357 <?php } ?> 358 359 <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Change' ); ?>"> 360 361 </form> 362 </div> 363 364 <?php } ?> 365 366 <?php 315 367 316 368 if ( ! empty( $input_id ) ) { … … 418 470 if ( SITECOOKIEPATH !== COOKIEPATH ) { 419 471 setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure ); 472 } 473 474 if ( isset( $_GET['wp_lang'] ) ) { 475 setcookie( 'wp_lang', sanitize_text_field( $_GET['wp_lang'] ), 0, COOKIEPATH, COOKIE_DOMAIN, $secure ); 420 476 } 421 477
Note: See TracChangeset
for help on using the changeset viewer.