Make WordPress Core


Ignore:
Timestamp:
09/05/2015 11:24:06 PM (9 years ago)
Author:
johnbillion
Message:

Remove the 'Site Admin' link from the Meta widget if the user doesn't have access to the admin area.

See #25162

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r33839 r33929  
    519519        else
    520520            $link = '';
     521    } elseif ( current_user_can( 'read' ) ) {
     522        $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
    521523    } else {
    522         $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
     524        $link = '';
    523525    }
    524526
Note: See TracChangeset for help on using the changeset viewer.