wpseek.com
A WordPress-centric search engine for devs and theme authors



login_footer › WordPress Function

Since3.1.0
Deprecatedn/a
login_footer ( $input_id = '' )
Parameters:
  • (string) $input_id Which input to auto-focus.
    Required: No
    Default: (empty)
Defined at:
Codex:

Outputs the footer for the login page.



Source

function login_footer( $input_id = '' ) {
	global $interim_login;

	// Don't allow interim logins to navigate away from the page.
	if ( ! $interim_login ) {
		?>
		<p id="backtoblog">
			<?php
			$html_link = sprintf(
				'<a href="%s">%s</a>',
				esc_url( home_url( '/' ) ),
				sprintf(
					/* translators: %s: Site title. */
					_x( '&larr; Go to %s', 'site' ),
					get_bloginfo( 'title', 'display' )
				)
			);
			/**
			 * Filter the "Go to site" link displayed in the login page footer.
			 *
			 * @since 5.7.0
			 *
			 * @param string $link HTML link to the home URL of the current site.
			 */
			echo apply_filters( 'login_site_html_link', $html_link );
			?>
		</p>
		<?php

		the_privacy_policy_link( '<div class="privacy-policy-page-link">', '</div>' );
	}

	?>
	</div><?php // End of <div id="login">. ?>

	<?php
	$languages = get_available_languages();

	if ( ! empty( $languages ) && ! $interim_login ) {
		?>

		<div class="language-switcher">
			<form id="language-switcher" action="" method="get">

				<label for="language-switcher-locales">
					<span class="dashicons dashicons-translation" aria-hidden="true"></span>
					<span class="screen-reader-text"><?php _e( 'Language' ); ?></span>
				</label>

				<?php
				$args = array(
					'id'                          => 'language-switcher-locales',
					'name'                        => 'wp_lang',
					'selected'                    => determine_locale(),
					'show_available_translations' => false,
					'explicit_option_en_us'       => true,
					'languages'                   => $languages,
				);

				/**
				 * Filters default arguments for the Languages select input on the login screen.
				 *
				 * @since 5.9.0
				 *
				 * @param array $args Arguments for the Languages select input on the login screen.
				 */
				wp_dropdown_languages( apply_filters( 'wp_login_language_switcher_args', $args ) );
				?>

				<?php if ( $interim_login ) { ?>
					<input type="hidden" name="interim-login" value="1" />
				<?php } ?>

				<?php if ( isset( $_GET['redirect_to'] ) && '' !== $_GET['redirect_to'] ) { ?>
					<input type="hidden" name="redirect_to" value="<?php echo esc_url_raw( $_GET['redirect_to'] ); ?>" />
				<?php } ?>

				<?php if ( isset( $_GET['action'] ) && '' !== $_GET['action'] ) { ?>
					<input type="hidden" name="action" value="<?php echo esc_attr( $_GET['action'] ); ?>" />
				<?php } ?>

					<input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Change' ); ?>">

				</form>
			</div>

<?php } ?>

	<?php

	if ( ! empty( $input_id ) ) {
		?>
		<script type="text/javascript">
		try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
		if(typeof wpOnload==='function')wpOnload();
		</script>
		<?php
	}

	/**
	 * Fires in the login page footer.
	 *
	 * @since 3.1.0
	 */
	do_action( 'login_footer' );

	?>
	<div class="clear"></div>
	</body>
	</html>
	<?php
}