login_headerurl WordPress Filter Hook

The login_headerurl hook allows you to change the URL that is displayed in the header when you are logged in. This can be useful if you want to redirect users to a different page after they login.

apply_filters( 'login_headerurl', string $login_header_url ) #

Filters link URL of the header logo above login form.


Parameters

$login_header_url

(string)Login header logo URL.


Top ↑

More Information

The “login_headerurl” filter is used to filter the URL of the logo on the WordPress login page. By default, this logo links to the WordPress site.

A plugin can register as a content filter with the code:


add_filter("login_headerurl","plugin_function_name");

Where “plugin_function_name” is the function WordPress should call when the content is being retrieved. Note that the filter function the plugin defines must return the URL after it is finished processing, or the logo may not have any links, and other plugins also filtering the same may generate errors.

You can also use this in the theme function.php file within your WordPress page if you don’t wish to use a plugin or want to distribute your theme.


Top ↑

Source

File: wp-login.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by the Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.