protected function update_post($post_id, array $record)
 {
     $event = $this->build_event_array($record);
     TribeEventsAPI::updateEvent($post_id, $event);
 }
Ejemplo n.º 2
0
 /**
  * Update an Event
  *
  * @param int $postId ID of the event to be modified.
  * @param array $args Args for updating the post. See {@link tribe_create_event()} for more info.
  * @return int ID of the event that was created. False if update failed.
  * @link http://codex.wordpress.org/Function_Reference/wp_update_post
  * @see wp_update_post()
  * @see tribe_create_event()
  * @category Event Functions
  * @since 2.0.1
  */
 function tribe_update_event($postId, $args)
 {
     $postId = TribeEventsAPI::updateEvent($postId, $args);
     return $postId;
 }
 /**
  * Save an existing event.
  *
  * @param int $tribe_event_id The event's ID.
  * @return int The saved event's ID.
  * @author Nick Ciske
  * @since 1.0
  */
 public function saveEvent($tribe_event_id)
 {
     $saved = TribeEventsAPI::updateEvent($tribe_event_id, $_POST);
     $this->save_submitted_attachment($tribe_event_id);
     // TODO: why aren't we saving taxonomy terms like in createEvent()?
     return $saved;
 }