Skip to content

Commit 48b9449

Browse files
committed
SPLOTified login
Better login hijinks
1 parent d447743 commit 48b9449

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

images/site-login-logo.png

100755100644
5.26 KB
Loading

includes/setup.php

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -469,31 +469,50 @@ function truwriter_is_preview() {
469469
# login stuff
470470
# -----------------------------------------------------------------
471471

472-
// Add custom logo to entry screen... because we can
473-
// While we are at it, use CSS to hide the "back to blog" and retrieve password links
472+
# -----------------------------------------------------------------
473+
# login stuff - things to set up special user, prevent access to WP
474+
# -----------------------------------------------------------------
474475

475-
// You know like my logo? Whatsamatta you? Then change the image in the theme folder images/site-login-logo.png
476-
add_action( 'login_enqueue_scripts', 'my_login_logo' );
476+
// Add custom logo to entry screen... because we can
477+
// While we are at it, use CSS to hide the back to blog and retried password links
478+
add_action( 'login_enqueue_scripts', 'splot_login_logo' );
477479

478-
function my_login_logo() { ?>
480+
function splot_login_logo() { ?>
479481
<style type="text/css">
480482
body.login div#login h1 a {
481483
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png);
482-
padding-bottom: 30px;
483-
}
484-
#backtoblog {display:none;}
485-
#nav {display:none;}
484+
height:90px;
485+
width:320px;
486+
background-size: 320px 90px;
487+
background-repeat: no-repeat;
488+
padding-bottom: 0px;
489+
}
486490
</style>
487491
<?php }
488492

489493

490494
// Make logo link points to blog, not Wordpress.org Change Dat
491495
// -- h/t http://www.sitepoint.com/design-a-stylized-custom-wordpress-login-screen/
492496

493-
add_filter( 'login_headerurl', 'login_link' );
497+
add_filter( 'login_headerurl', 'splot_login_link' );
498+
499+
function splot_login_link( $url ) {
500+
return 'https://splot.ca/';
501+
}
502+
503+
/* Customize message above registration form */
504+
505+
add_filter('login_message', 'splot_add_login_message');
506+
507+
function splot_add_login_message() {
508+
return '<p class="message">To do all that is SPLOT!</p>';
509+
}
510+
511+
// login page title
512+
add_filter( 'login_headertext', 'splot_login_logo_url_title' );
494513

495-
function login_link( $url ) {
496-
return get_bloginfo( 'url' );
514+
function splot_login_logo_url_title() {
515+
return 'The grand mystery of all things SPLOT';
497516
}
498517

499518

0 commit comments

Comments
 (0)