ap_count_post_flags( integer $post_id )
Description #
Count flag votes.
Parameters #
- $post_idinteger (Required) Post ID.
Source #
File: includes/flag.php
function ap_count_post_flags( $post_id ) {
$rows = ap_count_votes(
array(
'vote_post_id' => $post_id,
'vote_type' => 'flag',
)
);
if ( false !== $rows ) {
return (int) $rows[0]->count;
}
return 0;
}
Expand full source code Collapse full source code View on GitHub: includes/flag.php:99
Add your comment