Changeset 12571
- Timestamp:
- 05/04/2023 02:45:09 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
r12240 r12571 52 52 */ 53 53 add_filter( 'show_admin_bar', '__return_false', 101 ); 54 55 /**56 * Disable the Core Language Selector on wp-login.php.57 */58 add_filter( 'login_display_language_dropdown', '__return_false' );59 54 60 55 /** … … 320 315 * Note: See the 'Locale Detection' plugin for the switching of the locale. 321 316 */ 322 function wporg_login_language_switcher( ) {317 function wporg_login_language_switcher( $display = true ) { 323 318 $current_locale = get_locale(); 319 320 /* 321 * If something has explicitely disabled the switcher, don't show our version either. 322 * This is used for when we're called from the 'login_display_language_dropdown' filter. 323 */ 324 if ( ! $display ) { 325 return $display; 326 } 324 327 325 328 ?> … … 355 358 </script> 356 359 <?php 357 } 358 add_action( 'wp_footer', 'wporg_login_language_switcher', 1 ); 359 add_action( 'login_footer', 'wporg_login_language_switcher', 1 ); 360 361 return false; // For the login_display_language_dropdown filter. 362 } 363 add_action( 'wp_footer', 'wporg_login_language_switcher', 1, 0 ); 364 add_action( 'login_display_language_dropdown', 'wporg_login_language_switcher', 20 ); 360 365 361 366 /**
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)