Fix for site-admin / register link - http://mosquito.wordpress.org/view.php?id=603
git-svn-id: https://develop.svn.wordpress.org/trunk@2142 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
10c7a06b82
commit
7d19f5b25f
@ -26,7 +26,7 @@
|
||||
</li>
|
||||
<li id="meta"><?php _e('Meta:'); ?>
|
||||
<ul>
|
||||
<li><?php wp_register(); ?></li>
|
||||
<?php wp_register(); ?>
|
||||
<li><?php wp_loginout(); ?></li>
|
||||
<li><a href="feed:<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
|
||||
<li><a href="feed:<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
<li><h2><?php _e('Meta'); ?></h2>
|
||||
<ul>
|
||||
<li><?php wp_register(); ?></li>
|
||||
<?php wp_register(); ?>
|
||||
<li><?php wp_loginout(); ?></li>
|
||||
<li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
|
||||
<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
|
||||
|
@ -37,15 +37,17 @@ function wp_loginout() {
|
||||
echo apply_filters('loginout', $link);
|
||||
}
|
||||
|
||||
function wp_register() {
|
||||
function wp_register( $before = '<li>', $after = '</li>' ) {
|
||||
global $user_level;
|
||||
|
||||
get_currentuserinfo();
|
||||
|
||||
if (0 == $user_level && get_settings('users_can_register') ) :
|
||||
$link = '<a href="' . get_settings('siteurl') . '/wp-register.php">' . __('Register') . '</a>';
|
||||
$link = $before . '<a href="' . get_settings('siteurl') . '/wp-register.php">' . __('Register') . '</a>' . $after;
|
||||
elseif (0 == $user_level && !get_settings('users_can_register') ) :
|
||||
$link = '';
|
||||
else :
|
||||
$link = '<a href="' . get_settings('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>';
|
||||
$link = $before . '<a href="' . get_settings('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;
|
||||
endif;
|
||||
|
||||
echo apply_filters('register', $link);
|
||||
|
Loading…
Reference in New Issue
Block a user