beans_comment_links

Echo the comment links.

beans_comment_links( )

Return: (void)

Source

function beans_comment_links() {

	global $comment;

	beans_open_markup_e( 'beans_comment_links', 'ul', array( 'class' => 'tm-comment-links uk-subnav uk-subnav-line' ) );

		// Reply.
		echo get_comment_reply_link( array_merge( $comment->args, array(
			'add_below' => 'comment-content',
			'depth'     => $comment->depth,
			'max_depth' => $comment->args['max_depth'],
			'before'    => beans_open_markup( 'beans_comment_item[_reply]', 'li' ),
			'after'     => beans_close_markup( 'beans_comment_item[_reply]', 'li' ),
		) ) );

		// Edit.
		if ( current_user_can( 'moderate_comments' ) ) :

			beans_open_markup_e( 'beans_comment_item[_edit]', 'li' );

				beans_open_markup_e( 'beans_comment_item_link[_edit]', 'a', array(
					'href' => get_edit_comment_link( $comment->comment_ID ), // Automatically escaped.
				) );

					beans_output_e( 'beans_comment_edit_text', __( 'Edit', 'tm-beans' ) );

				beans_close_markup_e( 'beans_comment_item_link[_edit]', 'a' );

			beans_close_markup_e( 'beans_comment_item[_edit]', 'li' );

		endif;

		// Link.
		beans_open_markup_e( 'beans_comment_item[_link]', 'li' );

			beans_open_markup_e( 'beans_comment_item_link[_link]', 'a', array(
				'href' => get_comment_link( $comment->comment_ID ), // Automatically escaped.
			) );

				beans_output_e( 'beans_comment_link_text', __( 'Link', 'tm-beans' ) );

			beans_close_markup_e( 'beans_comment_item_link[_link]', 'a' );

		beans_close_markup_e( 'beans_comment_item[_link]', 'li' );

	beans_close_markup_e( 'beans_comment_links', 'ul' );

}