AnsPress_Notification_Hook::insert_reputation( integer $reputation_id, integer $user_id, string $event, integer $ref_id )

Description #

Notify user on new reputation.

Parameters #

  • $reputation_id
    integer (Required) Reputation id.
  • $user_id
    integer (Required) User id.
  • $event
    string (Required) Reputation event.
  • $ref_id
    integer (Required) Reputation reference id.

Source #

File: addons/free/notification.php

	public static function insert_reputation( $reputation_id, $user_id, $event, $ref_id ) {
		ap_insert_notification( array(
			'user_id'  => $user_id,
			'ref_id'   => $reputation_id,
			'ref_type' => 'reputation',
			'verb'     => ap_get_reputation_event_points( $event ) > 0 ? 'new_points' : 'lost_points',
		) );
	}

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