• Resolved Monkeyboy

    (@monkeyboy)


    When a subscriber logs in, a “Site Admin” link is displayed, so that they can amend their profile.

    Whilst I think a “Site Admin” link makes sense if you’re the Administrator, it seems wrong somehow if you’re a subscriber, or indeed anything below an Admin.

    Instead of reading…

    Site Admin | Log Out

    I think…

    Profile | Log Out

    would make more sense. Any way of doing this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • try to add this code to functions.php of your theme:

    add_filter('register','adapt_site_admin_link');
    function adapt_site_admin_link($link) {
    global $current_user;
    get_currentuserinfo();
    $user_roles = $current_user->roles;
    $user_role = array_shift($user_roles);
    if($user_role == 'administrator') $link = str_replace('Site Admin','Site Admin',$link);
    elseif($user_role == 'editor') $link = str_replace('Site Admin','Editor Admin',$link);
    elseif($user_role == 'author') $link = str_replace('Site Admin','Author Admin',$link);
    elseif($user_role == 'contributor') $link = str_replace('Site Admin','Contributor Admin',$link);
    elseif($user_role == 'subscriber') $link = str_replace('Site Admin','Profile',$link);
    return $link;
    }
    Thread Starter Monkeyboy

    (@monkeyboy)

    Excellent stuff. That worked.

    ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing "Site Admin" link’ is closed to new replies.