Deprecated

This function has been deprecated.

ap_comment_ajax_data( object $c,  $actions = true )

Description #

Return ajax comment data.

Parameters #

  • $c
    object (Required) Comment object.

Changelog #

VersionDescription
4.1.5Introduced.

Source #

File: includes/deprecated.php

function ap_comment_ajax_data( $c, $actions = true ) {
	return array(
		'ID'        => $c->comment_ID,
		'post_id'   => $c->comment_post_ID,
		'link'      => get_comment_link( $c ),
		'avatar'    => get_avatar( $c->user_id, 30 ),
		'user_link' => ap_user_link( $c->user_id ),
		'user_name' => ap_user_display_name( $c->user_id ),
		'iso_date'  => date( 'c', strtotime( $c->comment_date ) ),
		'time'      => ap_human_time( $c->comment_date_gmt, false ),
		'content'   => $c->comment_content,
		'approved'  => $c->comment_approved,
		'class'     => implode( ' ', get_comment_class( 'ap-comment', $c->comment_ID, null, false ) ),
		'actions'   => $actions ? ap_comment_actions( $c ) : [],
	);
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment