Skip to content

Commit

Permalink
Allow customized login message proudcity/wp-proudcity#1525
Browse files Browse the repository at this point in the history
  • Loading branch information
jlyon committed Mar 1, 2019
1 parent 95634af commit b83db4d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions wp-proud-core.php
Expand Up @@ -148,6 +148,7 @@ public function init() {
// Emojis
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
add_filter( 'login_message', array( $this, 'login_message' ) );
}

// Load common libraries
Expand Down Expand Up @@ -404,6 +405,19 @@ public function shortcode_featured_image( ){
return get_the_post_thumbnail_url(get_the_ID());
}

// Add a message to the login screen (if it is set in the proud_login_message option)
public function login_message( $message ) {
if ( empty($message) ){
$msg = get_option('proud_login_message', false);
if ($msg) {
return '<p>' . $msg . '</p>';
}
} else {
return $message;
}
}


}


Expand Down

0 comments on commit b83db4d

Please sign in to comment.