ap_delete_votes( integer $post_id, string $type = 'vote' )
Description #
Delete multiple post votes.
Parameters #
- $post_idinteger (Required) Post id.
- $typestring (Optional) Vote type. Default value: 'vote'
Source #
File: includes/votes.php
function ap_delete_votes( $post_id, $type = 'vote' ) {
global $wpdb;
$where = array(
'vote_post_id' => $post_id,
'vote_type' => $type,
);
$rows = $wpdb->delete( $wpdb->ap_votes, $where ); // phpcs:ignore WordPress.DB
if ( false !== $rows ) {
do_action( 'ap_deleted_votes', $post_id, $type );
return true;
}
return false;
}
Expand full source code Collapse full source code View on GitHub: includes/votes.php:707
Add your comment