Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean the admin login page a bit to remove the wordpress.org redirect #11

Open
cleverington opened this issue Jun 4, 2022 · 0 comments

Comments

@cleverington
Copy link
Owner

These changes are pretty straightforward.

I would say WordPress.php, since that Class is focused on cleaning cruft.

/**
 * Add to existing run() function
 */
public function run() {
    add_filter( 'login_headerurl', array($this,'login_logo_url') );
    add_filter( 'login_headertext', array($this,'login_logo_url_title') );
}

/**
 * Reset - Login page 'home' URL on Logo
 *
 * This function resets the link URL of the header logo above the login form.
 * Changes the default from 'WordPress' to the site-homepage.
 *
 * @since 1.0.1
 * @see https://developer.wordpress.org/reference/hooks/login_headerurl/
 */
public static function login_logo_url() : void {
	return home_url();
}

/**
 * Reset - Header logo Link Text on Login page
 *
 * Filters the link text of the header logo above the login form on the login page.
 *
 * @since 0.1.1
 * @see https://developer.wordpress.org/reference/hooks/login_headertext/
 */
public static function login_logo_url_title() : void {
	return get_bloginfo( 'name' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant