/** * Executes before the event is saved. * * @author Jason Rey <*****@*****.**> * @since 1.3 * @access public * @param array $post The posted data. * @param SocialCluster $cluster The cluster object. */ public function onEditBeforeSave(&$post, &$cluster) { // Get the posted value $value = isset($post['event_allday']) ? $post['event_allday'] : $cluster->isAllDay(); $value = (bool) $value; $cluster->meta->all_day = $value; unset($post['event_allday']); }