beans_comment_badges

Echo the comment badges.

beans_comment_badges( )

Return: (void)

Source

function beans_comment_badges() {

	global $comment;

	// Trackback badge.
	if ( 'trackback' == $comment->comment_type ) {

		beans_open_markup_e( 'beans_trackback_badge', 'span', array( 'class' => 'uk-badge uk-margin-small-left' ) );

			beans_output_e( 'beans_trackback_text', __( 'Trackback', 'tm-beans' ) );

		beans_close_markup_e( 'beans_trackback_badge', 'span' );

	}

	// Pindback badge.
	if ( 'pingback' == $comment->comment_type ) {

		beans_open_markup_e( 'beans_pingback_badge', 'span', array( 'class' => 'uk-badge uk-margin-small-left' ) );

			beans_output_e( 'beans_pingback_text', __( 'Pingback', 'tm-beans' ) );

		beans_close_markup_e( 'beans_pingback_badge', 'span' );

	}

	// Moderation badge.
	if ( '0' == $comment->comment_approved ) {

		beans_open_markup_e( 'beans_moderation_badge', 'span', array( 'class' => 'uk-badge uk-margin-small-left uk-badge-warning' ) );

			beans_output_e( 'beans_moderation_text', __( 'Awaiting Moderation', 'tm-beans' ) );

		beans_close_markup_e( 'beans_moderation_badge', 'span' );

	}

	// Moderator badge.
	if ( user_can( $comment->user_id, 'moderate_comments' ) ) {

		beans_open_markup_e( 'beans_moderator_badge', 'span', array( 'class' => 'uk-badge uk-margin-small-left' ) );

			beans_output_e( 'beans_moderator_text', __( 'Moderator', 'tm-beans' ) );

		beans_close_markup_e( 'beans_moderator_badge', 'span' );

	}

}