-
Notifications
You must be signed in to change notification settings - Fork 0
/
yes-login.php
83 lines (63 loc) · 2.1 KB
/
yes-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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/*
Plugin Name: YES Login
Description: custom login page
Donate link: https://yesandagency
Author: Yes& Agency
Author URI: https://yesandagency
Version: 1.9.8
Requires at least: 4.1
Tested up to: 6.1
Requires PHP: 7.0
Domain Path: languages
Text Domain: yes-login
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
// don't load directly
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
// Plugin constants
define( 'YES_Login_VERSION', '1.0.0' );
define( 'YES_Login_FOLDER', 'yes-login' );
define( 'YES_Login_URL', plugin_dir_url( __FILE__ ) );
define( 'YES_Login_DIR', plugin_dir_path( __FILE__ ) );
define( 'YES_Login_BASENAME', plugin_basename( __FILE__ ) );
require_once YES_Login_DIR . 'autoload.php';
register_activation_hook( __FILE__, array( '\IAVI\YES_Login\Plugin', 'activate' ) );
add_action( 'plugins_loaded', 'plugins_loaded_YES_Login_plugin' );
function plugins_loaded_YES_Login_plugin() {
\IAVI\YES_Login\Plugin::get_instance();
load_plugin_textdomain( 'yes-login', false, dirname( YES_Login_BASENAME ) . '/languages' );
}
function yes_login_style() {
echo '<style type="text/css">
body.login {
background-color: #FEE289;
}
body.login #login h1 a {
background-image: url(' . plugin_dir_url( __FILE__ ) . 'logo.png);
width: auto;
height: 100px;
background-size: contain;
}
</style>';
}
add_action('login_head', 'yes_login_style');
/**
* Remove reutrn to Pantheon button
*/
function remove_return_to_Pantheon_button_scripts_and_styles()
{
wp_dequeue_style('pantheon-login-mods');
wp_dequeue_script('pantheon-login-mods');
}
add_action( 'login_enqueue_scripts', 'remove_return_to_Pantheon_button_scripts_and_styles', 25 );
function disable_return_to_Pantheon_button()
{
remove_action('login_header', 'Return_To_Pantheon_Button_HTML');
remove_action('login_enqueue_scripts', 'Pantheon_Enqueue_Login_script');
remove_action('login_enqueue_scripts', 'Pantheon_Enqueue_Login_style');
}
add_action( 'after_setup_theme', 'disable_return_to_Pantheon_button', 10 );