From 547742f14a213a02b71d499c36348aa7fe2672b3 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 5 Sep 2015 23:24:06 +0000 Subject: [PATCH] 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 --- src/wp-includes/general-template.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 8a63a12d12..f73d57aae4 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -518,8 +518,10 @@ function wp_register( $before = '
  • ', $after = '
  • ', $echo = true ) { $link = $before . '' . __('Register') . '' . $after; else $link = ''; - } else { + } elseif ( current_user_can( 'read' ) ) { $link = $before . '' . __('Site Admin') . '' . $after; + } else { + $link = ''; } /**