wppaste
WordPress

login_footer( string $input_id = '' )

Since
3.1.0
Source
wp-login.php:325
Outputs the footer for the login page.

Compatibility

WordPress
since 3.1.0
PHP
7.4–8.6-dev
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.

Parameters

$input_idstringoptional
Which input to auto-focus.Default: ''

Performance profile

How much work a call to login_footer() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.

Cost class
Moderate

Reads stored settings via get_option(), cached per request but not free on a cold cache.

Scaling
Constant

No loop in the body: the same number of instructions runs whatever you pass in.

Instructions
13–134

Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 134.

Plugin surface
4 hooks

Third-party callbacks on 'login_site_html_link', 'login_display_language_dropdown', 'login_language_dropdown_args' run inside this call, and their cost is not bounded by anything here.

Called by
0

Nothing in core calls this; the cost is only what you spend yourself.

What it touches

  • hookthird-party callbacksapply_filters()called directly
  • optionoption read or writeget_option()one call below login_footer()

Further down the call graph this can also reach cache, serialize, query, transient and http. Those are the worst case, several calls deep and usually down an error path, not what a normal call pays.

What one call costs · 28 distinct outcomes

One number would be a lie: the work depends on which branch runs. These are every distinct cost login_footer() can have, taken from its control-flow graph on PHP 8.5.

WhenInstructionsCalls it makes
empty($input_id)13do_action()
!apply_filters() && empty($input_id)18apply_filters(), do_action()
apply_filters() && empty($languages) && empty($input_id)24apply_filters(), get_available_languages(), do_action()
!empty($input_id)26ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
!apply_filters() && !empty($input_id)31apply_filters(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && empty($languages) && !empty($input_id)37apply_filters(), get_available_languages(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
empty($input_id)47home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), do_action()
!apply_filters() && empty($input_id)52home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), do_action()
apply_filters() && empty($languages) && empty($input_id)58home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), do_action()
apply_filters() && !empty($languages) && empty($input_id)60–69apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), esc_attr_e(), do_action()
!empty($input_id)60home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
!apply_filters() && !empty($input_id)65home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
16 further outcomes, up to 134 instructions
apply_filters() && empty($languages) && !empty($input_id)71home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && !empty($languages) && isset($value) && empty($input_id)73–78apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), esc_attr(), esc_attr_e(), do_action()
apply_filters() && !empty($languages) && isset($value) && empty($input_id)73–78apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), sanitize_url(), esc_attr_e(), do_action()
apply_filters() && !empty($languages) && !empty($input_id)73–82apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), esc_attr_e(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && !empty($languages) && isset($value) && empty($input_id)86–87apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), sanitize_url(), esc_attr(), esc_attr_e(), do_action()
apply_filters() && !empty($languages) && isset($value) && !empty($input_id)86–91apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), esc_attr(), esc_attr_e(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && !empty($languages) && isset($value) && !empty($input_id)86–91apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), sanitize_url(), esc_attr_e(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && !empty($languages) && empty($input_id)94–103home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), esc_attr_e(), do_action()
apply_filters() && !empty($languages) && isset($value) && !empty($input_id)99–100apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), sanitize_url(), esc_attr(), esc_attr_e(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && !empty($languages) && isset($value) && empty($input_id)107–112home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), esc_attr(), esc_attr_e(), do_action()
apply_filters() && !empty($languages) && isset($value) && empty($input_id)107–112home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), sanitize_url(), esc_attr_e(), do_action()
apply_filters() && !empty($languages) && !empty($input_id)107–116home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), esc_attr_e(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && !empty($languages) && isset($value) && empty($input_id)120–121home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), sanitize_url(), esc_attr(), esc_attr_e(), do_action()
apply_filters() && !empty($languages) && isset($value) && !empty($input_id)120–125home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), esc_attr(), esc_attr_e(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && !empty($languages) && isset($value) && !empty($input_id)120–125home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), sanitize_url(), esc_attr_e(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()
apply_filters() && !empty($languages) && isset($value) && !empty($input_id)133–134home_url(), esc_url(), _x(), get_bloginfo(), sprintf(), apply_filters(), the_privacy_policy_link(), apply_filters(), get_available_languages(), _e(), determine_locale(), apply_filters(), wp_dropdown_languages(), sanitize_url(), esc_attr(), esc_attr_e(), ob_start(), ob_get_clean(), wp_remove_surrounding_empty_script_tags(), wp_print_inline_script_tag(), do_action()

Across PHP versions

PHPCompiledExecutedBranchesNotes
8.6-dev13413–13410
8.513413–13410
8.413413–134101 fewer instruction than PHP 8.3
8.313513–13510
8.213513–13510
8.113513–13510
7.413513–13510

An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.

Hooks and filters fired · 4

4 hooks fire while login_footer() runs, in this order:

  1. apply_filters( login_site_html_link )filterline 349 (+24 into the body)

    Filters the "Go to site" link displayed in the login page footer.

  2. apply_filters( login_display_language_dropdown )filterline 370 (+45 into the body)

    Filters whether to display the Language selector on the login screen.

  3. apply_filters( login_language_dropdown_args )filterline 402 (+77 into the body)

    Filters default arguments for the Language select input on the login screen.

  4. do_action( login_footer )actionline 442 (+117 into the body)

    Fires in the login page footer.

Uses · 16

Show all 16

Source code

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' )				)			);			/**			 * Filters 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	if (		! $interim_login &&		/**		 * Filters whether to display the Language selector on the login screen.		 *		 * @since 5.9.0		 *		 * @param bool $display Whether to display the Language selector on the login screen.		 */		apply_filters( 'login_display_language_dropdown', true )	) {		$languages = get_available_languages(); 		if ( ! empty( $languages ) ) {			?>			<div class="language-switcher">				<form id="language-switcher" method="get"> 					<label for="language-switcher-locales">						<?php _e( 'Language' ); ?><span class="dashicons dashicons-translation" aria-hidden="true"></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 Language select input on the login screen.					 *					 * The arguments get passed to the wp_dropdown_languages() function.					 *					 * @since 5.9.0					 *					 * @param array $args Arguments for the Language select input on the login screen.					 */					wp_dropdown_languages( apply_filters( 'login_language_dropdown_args', $args ) );					?> 

Changelog

Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-login.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.