public function test_before_after() { $comment = reset(self::$comments); $url_link = get_comment_author_url_link('Burrito', 'I would love a ', ' right now.', $comment); $link = 'I would love a ' . $this->parseCommentAuthorUrl($comment, 'Burrito') . ' right now.'; $this->assertEquals($link, $url_link); }
/** * Displays the HTML link of the url of the author of the current comment. * * @since 0.71 * * @param string $linktext Optional. Text to display instead of the comment author's * email address. Default empty. * @param string $before Optional. Text or HTML to display before the email link. * Default empty. * @param string $after Optional. Text or HTML to display after the email link. * Default empty. */ function comment_author_url_link($linktext = '', $before = '', $after = '') { echo get_comment_author_url_link($linktext, $before, $after); }
function start_el(&$output, $comment, $depth, $args) { $depth++; $GLOBALS['comment_depth'] = $depth; if (!empty($args['callback'])) { call_user_func($args['callback'], $comment, $args, $depth); return; } if ($this->count == 0) { $this->count = get_comments_number(); } $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); echo get_comment_author_url_link(GZ_Comments::get_ping_text($comment)) . ', '; }
/** * Display comment author's display name if author is registered * */ function franz_comment_author_link($user_id) { if ($user_id) { $author = get_userdata($user_id); $author_link = get_comment_author_url_link($author->display_name, '', ''); } else { $author_link = get_comment_author_link(); } return apply_filters('franz_comment_author_link', $author_link); }