Skip to content

friends_get_comments

Alex Kirk edited this page Nov 22, 2024 · 4 revisions

Auto-generated Example

add_filter(
    'friends_get_comments',
    function (
        $comments,
        $post_id
    ) {
        // Your code here
        return $comments;
    },
    10,
    2
);

Parameters

  • $comments
  • $post_id Other variable names: $_post_id

Files

apply_filters(
			'friends_get_comments',
			get_comments(
				array(
					'post_id' => $post_id,
					'status'  => 'approve',
					'order'   => 'ASC',
				)
			),
			$post_id
		)
apply_filters(
		'friends_get_comments',
		get_comments(
			array(
				'post_id' => $_post_id,
				'status'  => 'approve',
				'order'   => 'ASC',
				'orderby' => 'comment_date_gmt',
			)
		),
		$_post_id
	)

Hooks

Clone this wiki locally