/**
  * Add a note to a ticket.
  *
  * @since	1.0
  * @param	str		$note	The note to add
  * @return	int		The ID of the note added
  */
 public function add_note($note = false)
 {
     // Return if no note specified
     if (empty($note)) {
         return false;
     }
     return kbs_ticket_insert_note($this->ID, $note);
 }
/**
 * Adds a note to a ticket.
 *
 * @since	1.0
 * @return	void
 */
function kbs_ajax_ticket_insert_note()
{
    $note_id = kbs_ticket_insert_note($_POST['ticket_id'], $_POST['note_content']);
    wp_send_json(array('note_id' => $note_id));
}