-
Notifications
You must be signed in to change notification settings - Fork 0
/
sixteenbit-wp-login.php
executable file
·62 lines (52 loc) · 1.52 KB
/
sixteenbit-wp-login.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* Plugin Name: Sixteenbit Login
* Plugin URI: https://gitlab.com/sixteenbit/sixteenbit-login
* Description: Custom styles for login screen.
* Version: 1.0.0
* Author: Sixteenbit
* Author URI: https://sixteenbit.com
* Text Domain: sixteenbit-wp-login
*/
/**
* Enqueue custom login stylesheet/
*/
function sixteenbit_wp_login_stylesheet() {
wp_enqueue_style( 'custom-login', plugins_url( '/assets/css/login.css', __FILE__ ) );
}
add_action( 'login_enqueue_scripts', 'sixteenbit_wp_login_stylesheet' );
/**
* Replace WordPress in <title>
*
* @param $origtitle
*
* @return string
*/
function sixteenbit_wp_login_title( $origtitle ) {
return esc_html( 'Login ‹ ' ) . get_option( 'blogname' );
}
add_filter( 'login_title', 'sixteenbit_wp_login_title', 99 );
/**
* Set logo url to home
*
* @return string|void
*/
function sixteenbit_wp_login_logo_url() {
return home_url();
}
add_action( 'login_headerurl', 'sixteenbit_wp_login_logo_url' );
/**
* Change Header Title to blogname
*
* @return false|mixed|void
*/
function sixteenbit_wp_login_headertitle() {
return get_option( 'blogname' );
}
add_filter( 'login_headertext', 'sixteenbit_wp_login_headertitle' );
require 'updater/plugin-update-checker.php';
$loginUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
'https://wordpress.sixteenbit.dev/updates/?action=get_metadata&slug=sixteenbit-wp-login', //Metadata URL.
__FILE__, //Full path to the main plugin file.
'sixteenbit-wp-login' //Plugin slug. Usually it's the same as the name of the directory.
);