From 504cd3bf15a754e9888fcba43f9e963c91fce527 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 5 Sep 2015 23:25:24 +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 Built from https://develop.svn.wordpress.org/trunk@33929 git-svn-id: http://core.svn.wordpress.org/trunk@33898 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 8a63a12d12..f73d57aae4 100644 --- a/wp-includes/general-template.php +++ b/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 = ''; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 9d48aa8cc7..66561e8c16 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33928'; +$wp_version = '4.4-alpha-33929'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.