How do I load the contents of a text file - or any other file, like .php - and use the test for the login_message hook that prints a message above the #login box in wp-login.php?
(BTW, this is in a child theme, if it makes a difference.)
function custom_login_message() {
$message = get_bloginfo('stylesheet_directory')."/tos.txt";
return $message;
}
add_filter('login_message', 'custom_login_message');
Right now, the function above prints out the URL of the file, not the text in the file, i.e.:
