Created
October 7, 2021 01:41
-
-
Save strsar/ab8b107adb15a326e5b0d6a47d35008f to your computer and use it in GitHub Desktop.
[WP] Brand login
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php defined('ABSPATH') or header('Location: /'); | |
| /** | |
| * Admin login form | |
| */ | |
| add_action('login_enqueue_scripts', function() { | |
| $upload_dir = wp_upload_dir(); | |
| echo '<style>#login h1 a, .login h1 a {background-image:url('.$upload_dir['baseurl'].'/site/login.svg);background-size:72px}</style>'; | |
| }); | |
| add_filter('login_headertext', function() { | |
| return get_bloginfo('name'); | |
| }); | |
| add_filter('login_headerurl', function() { | |
| return home_url(); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment