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

See #25162


git-svn-id: https://develop.svn.wordpress.org/trunk@33929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2015-09-05 23:24:06 +00:00
parent 038a2c3b7a
commit 547742f14a
1 changed files with 3 additions and 1 deletions

View File

@ -518,8 +518,10 @@ function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {
$link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __('Register') . '</a>' . $after;
else
$link = '';
} else {
} elseif ( current_user_can( 'read' ) ) {
$link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
} else {
$link = '';
}
/**