WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have added new fields on the user profile page.

I want to display a message that says: "It's good ... or not"

I couldn't find a hook in the WordPress codex.

I don't want to use a plugin only my own code I want change this code :

<div id="message" class="updated">
    <p><strong>Updated profile </strong></p>
share|improve this question
up vote 2 down vote accepted

You will have to use a gettext filter as there are no hooks or filters associated with your request.

function custom_user_message($translation, $text){
    if('Profile updated.' == $text){
        $current_user = wp_get_current_user();
        $foo_condition = ''; //Do some checking here for user custom field
            return $text.' Custom Message';
    return $translation;
add_filter( 'gettext', 'custom_user_message', 10, 2 );
share|improve this answer
Yes, thanks i try this way :) – Mepps Dec 28 '11 at 12:01

I know this is old but it could help others. There is actually an action to use with this: admin_notices. Here is the link to it on the Codex

Here is how you would use it:

function my_admin_notice(){
    echo '<div class="updated">
       <p>Aenean eros ante, porta commodo lacinia.</p>
add_action('admin_notices', 'my_admin_notice');
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.