Notifications::select_answer( object $_post )

Description #

Notify user when their answer is selected.

Parameters #

  • $_post
    object (Required) Post object.

Source #

File: addons/notifications/notifications.php

	public function select_answer( $_post ) {
		// Award select answer points to question author only.
		if ( get_current_user_id() !== (int) $_post->post_author ) {
			ap_insert_notification(
				array(
					'user_id'  => $_post->post_author,
					'actor'    => get_current_user_id(),
					'parent'   => $_post->post_parent,
					'ref_id'   => $_post->ID,
					'ref_type' => 'answer',
					'verb'     => 'best_answer',
				)
			);
		}
	}

1 Comment

  1. I see you don’t monetize your website, don’t waste
    your traffic, you can earn additional cash every month because you’ve got high quality content.
    If you want to know how to make extra bucks, search for: Ercannou’s essential adsense
    alternative

    Reply

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