Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_comment_author_url_link [ WordPress Function ]

get_comment_author_url_link ( $linktext = '', $before = '', $after = '' )
Parameters:
  • (string) $linktext The text to display instead of the comment author's email address
  • (string) $before The text or HTML to display before the email link.
  • (string) $after The text or HTML to display after the email link.
Uses:
Returns:
  • (string) The HTML link between the $before and $after parameters
Defined at:



Retrieves the HTML link of the url of the author of the current comment.

$linktext parameter is only used if the URL does not exist for the comment author. If the URL does exist then the URL will be used and the $linktext will be ignored.

Encapsulate the HTML link between the $before and $after. So it will appear in the order of $before, link, and finally $after.

Source


<?php
function get_comment_author_url_link$linktext ''$before ''$after '' ) {
    
$url get_comment_author_url();
    
$display = ($linktext != '') ? $linktext $url;
    
$display str_replace'http://www.'''$display );
    
$display str_replace'http://'''$display );
    if ( 
'/' == substr($display, -1) )
        
$display substr($display0, -1);
    
$return "$before<a href='$url' rel='external'>$display</a>$after";
    return 
apply_filters('get_comment_author_url_link'$return);
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics