ap_update_subscribers_count( integer $post_id, integer $count = false )

Description #

Set subscribers count for a qameta.

Parameters #

  • $post_id
    integer (Required) Post ID.
  • $count
    integer (Optional) Custom count to update. Default value: false

Changelog #

VersionDescription
3.1.0Introduced.

Source #

File: includes/qameta.php

function ap_update_subscribers_count( $post_id, $count = false ) {
	if ( false === $count ) {
		$count = ap_subscribers_count( 'question', $post_id );
	}

	ap_insert_qameta( $post_id, array( 'subscribers' => $count ) );

	return $count;
}

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