Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@alexavalossv
Last active December 27, 2019 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexavalossv/4d1874e84b2dbf9d6a556ce49ec30017 to your computer and use it in GitHub Desktop.
Save alexavalossv/4d1874e84b2dbf9d6a556ce49ec30017 to your computer and use it in GitHub Desktop.
Personalizar imagen wp-login de WordPress
<?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