AnsPress_Vote::delete_votes( integer $post_id )

Description #

Delete post votes.

Parameters #

  • $post_id
    integer (Required) Post ID.

Source #

File: includes/votes.php

	public static function delete_votes( $post_id ) {
		$votes = ap_get_votes( array( 'vote_post_id' => $post_id ) );

		foreach ( (array) $votes as $vote ) {
			ap_delete_post_vote( $vote->vote_post_id, $vote->vote_user_id );
		}
	}

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