Created
March 22, 2013 03:23
-
-
Save spencejs/5218707 to your computer and use it in GitHub Desktop.
Add Alert to Wordpress Admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//New User Alert | |
add_action( 'admin_notices', 'custom_error_notice' ); | |
function custom_error_notice(){ | |
global $current_user; | |
get_currentuserinfo(); | |
$author_info = get_userdata($current_user->ID); | |
if($author_info->title == '') | |
echo '<div class="error"><p><strong>New User:</strong> Please visit your <a href="'.get_bloginfo('wpurl').'/wp-admin/profile.php" title="Your Profile">Profile</a> to Fill in your Job Title and set your Display Name. This alert will go away when you Job Title is set.</p></div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment