Last active
December 27, 2019 08:54
-
-
Save alexavalossv/4d1874e84b2dbf9d6a556ce49ec30017 to your computer and use it in GitHub Desktop.
Personalizar imagen wp-login de WordPress
This file contains 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 | |
/* | |
Plugin Name: Tu plugin | |
Plugin URI: https://tuweb.com | |
Description: Plugin con las funciones personalizadas para tu web | |
Version: 1.0.0 | |
Author: Tu Nombre | |
Author URI: https://tuweb.com | |
License: GPL 2+ | |
License URI: https://tuweb.com | |
*/ | |
//Cambiar el logo | |
add_action( 'login_enqueue_scripts', 'bs_change_login_logo' ); | |
function bs_change_login_logo() { ?> | |
<style type="text/css"> | |
#login h1 a { | |
background-image: url(https://tuweb.com/wp-content/uploads/logo-login.png); | |
} | |
</style> | |
<?php } | |
//Cambiar la URL del logo | |
add_filter( 'login_headerurl', 'bs_login_logo_url' ); | |
function bs_login_logo_url($url) { | |
return 'https://tuweb.com/';} | |
//Cambiar el título de la URL del logo | |
add_filter( 'login_headertitle', 'bs_login_logo_url_title' ); | |
function bs_login_logo_url_title() { | |
return 'Made with love';} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment