AnsPress_Notification_Hook::trash_question( integer $post_id, object $_post )

Description #

Remove all notifications related to question when its get deleted.

Parameters #

  • $post_id
    integer (Required) Post ID.
  • $_post
    object (Required) Post object.

Source #

File: addons/free/notification.php

	public static function trash_question( $post_id, $_post ) {
		ap_delete_notifications( array(
			'parent'   => $post_id,
			'ref_type' => [ 'answer', 'vote_up', 'vote_down', 'post' ],
		) );
	}

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