1 7doves Feb 13, 2010 13:17
3 tilqicom Feb 13, 2010 22:03
sam2kb wrote:
This is not a bug!
Just use this
user_logout_link( '', '', '<img src="img/nameofimage.png"/>', '#' );
yeah but isnt that weird anyway ? that you have to provide blanks to the other values in order to replace just the default text "log in" ?
afai am concerned user_logout_link( $link_text => 'whatever';) should replace link_text without providing others.
i mean isnt it
<a>$link_text</a> ?
so why does it do this instead:
whatever<a>Log in</a>
?
4 sam2kb Feb 13, 2010 22:10
function get_user_logout_link( $before = '', $after = '', $link_text = '', $link_title = '#', $params = array() )
{
global $current_User;
if( ! is_logged_in() )
{
return false;
}
if( $link_text == '' ) $link_text = T_('Logout');
if( $link_title == '#' ) $link_title = T_('Logout from your account');
$r = $before;
$r .= '<a href="'.get_user_logout_url().'"';
$r .= get_field_attribs_as_string( $params, false );
$r .= ' title="'.$link_title.'">';
$r .= sprintf( $link_text, $current_User->login );
$r .= '</a>';
$r .= $after;
return $r;
}
I don't get what you're saying... Try if this works better
user_logout_link( '', '', NULL );
EDIT:
Now I see what you mean :)
The function should be converted to use $params like all others? Feel free to edit it in CVS ;)
user_logout_link( array(
'link_text' => 'blah',
) );
5 tilqicom Feb 13, 2010 23:44
sam2kb wrote:
[php]
EDIT:
Now I see what you mean :)
The function should be converted to use $params like all others? Feel free to edit CVS ;)[php]user_logout_link( array(
'link_text' => 'blah',
) );[/php]
precisely.thanks
This is not a bug!
Just use this
or this