-
Notifications
You must be signed in to change notification settings - Fork 14
friends_get_comments
Alex Kirk edited this page Nov 22, 2024
·
4 revisions
add_filter(
'friends_get_comments',
function (
$comments,
$post_id
) {
// Your code here
return $comments;
},
10,
2
);
$comments
-
$post_id
Other variable names:$_post_id
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
)