public static function editPost($x, $post_id, &$cur, $content, $struct, $publish) { # Check if we have mt_keywords in struct if (isset($struct['mt_keywords'])) { $meta = new dcMeta($x->core); $meta->delPostMeta($post_id, 'tag'); foreach ($meta->splitMetaValues($struct['mt_keywords']) as $m) { $meta->setPostMeta($post_id, 'tag', $m); } } }
public static function delMeta(&$core, $get, $post) { if (empty($post['postId'])) { throw new Exception('No post ID'); } if (empty($post['metaId'])) { throw new Exception('No meta ID'); } if (empty($post['metaType'])) { throw new Exception('No meta type'); } $meta = new dcMeta($core); $meta->delPostMeta($post['postId'], $post['metaType'], $post['metaId']); return true; }