Why is if is admin not working?
<p>I edited a bit of code the other day from the Wordpress Ultimate Members plug-in to change the user profile to pending if the profile is edited by the user.</p>

<p>However, I noted that the code also sets the admin account to pending too.  I don’t want this, so I have been trying to use an if/ else statement to query if the user is admin before the script runs.</p>

<p>I know this is straight forward for experts in PHP, but I have tried lots of variations and admin is still being set to pending approval.</p>

<p>Here’s the original code that is setting admin to pending:</p>

<pre><code>// Set profile to under review after edits
add_action('um_user_edit_profile', 'um_post_edit_pending_hook', 10, 2); 
    function um_post_edit_pending_hook($user_id, $args){ 
        global $ultimatemember; 
        $ultimatemember-&gt;user-&gt;pending(); 
}
</code></pre>

<p>Here s the code that I am trying to bypass admin with which won’t work.  I won’t add all the variations I have tried.</p>

<pre><code>add_action('um_user_edit_profile', 'um_post_edit_pending_hook', 10, 2); 
function um_post_edit_pending_hook($user_id, $args){ 
if ( is_admin() ) {
    return false;
    } else { 
        global $ultimatemember; 
        $ultimatemember-&gt;user-&gt;pending(); 
    }
}
</code></pre>

<p>Any assistance would gratefully be appreciated.</p>