mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
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:
@@ -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 = '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user