'; /* Get the avatar. */ $avatar .= get_avatar( get_comment_author_email(), '80', $default_avatar, wp_specialchars( $author, 1 ) ); /* Close hyperlink. */ if ( $url ) $avatar .= ''; return apply_filters( 'hybrid_avatar', $avatar ); } /** * Displays individual comments. Uses the callback parameter for * wp_list_comments(). Overwrites the default display of comments. * * @since 0.2.3 * @param $comment The comment variable * @param $args Array of arguments passed from wp_list_comments() * @param $depth What level the particular comment is */ function hybrid_comments_callback( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; $GLOBALS['comment_depth'] = $depth; ?>
  • | __('Reply', 'hybrid'), 'login_text' => __('Log in to reply.', 'hybrid'), 'depth' => $depth, 'max_depth' => $max_depth, 'before' => '| ', 'after' => '' ) ); endif; ?> ' . __('Edit', 'hybrid') . '', ' | ', '' ); ?> comment_approved == '0' ) : ?>
    '; } /** * Properly displays comment author name/link. bbPress and other external * systems sometimes don't set a display name for registrations. WP has problems * if no display name is set. WP gives registered users URL of 'http://' if none is set. * * @since 0.2.2 * @global $comment The current comment's DB object. * @return string */ function hybrid_comment_author() { global $comment; $author = get_comment_author(); $url = get_comment_author_url(); /* Registered members w/o URL defaults to 'http://'. */ if ( $url == 'http://' ) $url = false; /* * Registered through bbPress sometimes leaves no display name. * Bug with bbPress 0.9 series and WP 2.5 (no later testing). */ if ( $comment->user_id > 0 ) : $user = get_userdata( $comment->user_id ); if ( $user->display_name ) $author = $user->display_name; elseif ( $user->user_nickname ) $author = $user->nickname; elseif ( $user->user_nicename ) $author = $user->user_nicename; elseif ( $user->user_login ) $author = $user->user_login; endif; /* Display link and cite if URL is set. Also, properly cites trackbacks/pingbacks. */ if ( $url ) $output = '' . $author . ''; else $output = '' . $author . ''; return apply_filters( 'hybrid_comment_author', $output ); } /** * Displays individual pings. Uses the callback parameter for wp_list_comments(). * * @uses hybrid_comments_callback * Use the hybrid_pings_callback filter to customize. * * @since 0.6 * @param $comment The comment variable. * @param $args Array of arguments passed from wp_list_comments(). * @param $depth What level the particular comment is. */ function hybrid_pings_callback( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; $GLOBALS['comment_depth'] = $depth; $ping = apply_filters( 'hybrid_pings_callback', false ); if ( $ping ) echo $ping; else hybrid_comments_callback( $comment, $args, $depth ); } /** * Ends the display of individual pings. Uses the callback parameter for * wp_list_comments(). Needs to be used in conjunction with hybrid_pings_callback(). * * @uses hybrid_comments_callback * Use the hybrid_pings_callback filter to customize. * * @since 0.6 */ function hybrid_pings_end_callback() { $ping = apply_filters( 'hybrid_pings_end_callback', false ); if ( $ping ) echo $ping; else hybrid_comments_end_callback(); } ?>