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
This commit is contained in:
John Blackbourn 2015-09-05 23:25:24 +00:00
parent 48a41a6663
commit 504cd3bf15
2 changed files with 4 additions and 2 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; $link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __('Register') . '</a>' . $after;
else else
$link = ''; $link = '';
} else { } elseif ( current_user_can( 'read' ) ) {
$link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after; $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
} else {
$link = '';
} }
/** /**

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.