Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save taricco/f8f0743ae176c679a336447fdde8cad6 to your computer and use it in GitHub Desktop.
Save taricco/f8f0743ae176c679a336447fdde8cad6 to your computer and use it in GitHub Desktop.
//* Custom logo for Password Protected plugin: https://wordpress.org/plugins/password-protected/
function wsv_password_protected_logo() {
?>
<style type="text/css">
body.login div#login h1 a {
background-image: url(/wp-content/mu-plugins/admin_pw_login.png);
margin: 0 auto;
}
body.login div#login h2 {
text-align: center;
font-size: 16px;
}
</style>
<?php
}
add_action( 'login_enqueue_scripts', 'wsv_password_protected_logo' );
function wsv_password_protected_message() {
echo '<h2>Password Required for Access</h2>';
}
add_action( 'password_protected_login_message', 'wsv_password_protected_message' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment