functions.php: customize wordpress relogin logo

This commit is contained in:
Silvan Calarco 2024-12-07 00:03:30 +01:00
parent 49be8da9ff
commit 00584e2f08

View File

@ -5,7 +5,25 @@ if ( !defined( 'ABSPATH' ) ) {
exit;
}
//add_action( 'login_init', 'send_frame_options_header', 10, 0 );
function my_login_logo() { ?>
<style type="text/css">
#login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/openmamba-64x64.png);
height: 64px;
width: 64px;
background-size: 64px 64px;
background-repeat: no-repeat;
padding-bottom: 30px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );
function my_login_stylesheet() {
wp_enqueue_style( 'custom-login', get_stylesheet_directory_uri() . '/style.css' );
// wp_enqueue_script( 'custom-login', get_stylesheet_directory_uri() . '/style-login.js' );
}
add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );
// Convenience function for translations in 'responsive' domain
function _r($text) {