ap_add_flag( integer $post_id, integer $user_id = false )

Description #

Add flag vote data to ap_votes table.

Parameters #

  • $post_id
    integer (Required) Post ID.
  • $user_id
    integer (Optional) User ID. Default value: false

Source #

File: includes/flag.php

function ap_add_flag( $post_id, $user_id = false ) {
	if ( false === $user_id ) {
		$user_id = get_current_user_id();
	}

	$inserted = ap_vote_insert( $post_id, $user_id, 'flag' );

	return $inserted;
}

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