How to change the default registration email ? (plugin and/or non-plugin)

The new user email is sent using the wp_new_user_notification() function. This function is pluggable, which means that you can overwrite it: // Redefine user notification function if ( !function_exists(‘wp_new_user_notification’) ) { function wp_new_user_notification( $user_id, $plaintext_pass=”” ) { $user = new WP_User($user_id); $user_login = stripslashes($user->user_login); $user_email = stripslashes($user->user_email); $message = sprintf(__(‘New user registration on your blog … Read more

Get name of the current template file

You could set a global variable during the template_include filter and then later check that global vairable to see which template has been included. You naturally wouldn’t want the complete path along with the file, so i’d recommend truncating down to the filename using PHP’s basename function. Example code: Two functions, one to set the … Read more