Exemplo n.º 1
0
function comments_rows($rows, $type = "")
{
    global $wpdb;
    if (!$rows) {
        ?>
		<tr class="empty">
			<td colspan="5"><p>No Comments Found</p></td>
		</tr> 
	<?php 
        return;
    } else {
        ?>
	<?php 
        $comment = new WT_Comment();
        foreach ($rows as $row) {
            echo get_comment_row_html($comment->db_out($row), $type);
        }
    }
}
Exemplo n.º 2
0
 public function comments()
 {
     global $wpdb;
     if (!$this->id) {
         return;
     }
     $comment = new WT_Comment();
     return $comment->get_by_event($this->id);
 }
Exemplo n.º 3
0
     $comment->db_response("json");
     break;
 case "unapprove_comment":
     $comment = new WT_Comment($_POST["comment_id"]);
     $comment->unapprove($_POST["_nonce"], $_POST["event_id"]);
     $comment->db_response("json");
     break;
 case "delete_comment":
     $comment = new WT_Comment($_POST["comment_id"]);
     $comment->delete($_POST["_nonce"], $_POST["event_id"]);
     $comment->db_response("json");
     break;
 case "delete_all_comments":
     unset($_POST["action"]);
     if ($_POST["id"]) {
         $comment = new WT_Comment();
         $comment->delete_all(json_decode(stripslashes($_POST["id"])), $_POST["_nonce"]);
         $comment->db_response("json");
     }
     break;
     //RSVP
 //RSVP
 case "not-attend":
     $rsvp = new WT_RSVP();
     $rsvp->notattend_event($_POST["event_id"]);
     $rsvp->panel_markup($_POST["event_id"]);
     break;
 case "attend":
     $rsvp = new WT_RSVP($_POST["event_id"]);
     $rsvp->attend_event($_POST["event_id"]);
     $rsvp->panel_markup($_POST["event_id"]);