function doAjaxRemove() { $data = am4Request::get("data"); parse_str($data, $vars); if (!empty($vars['post']) && is_array($vars['post'])) { foreach ($vars['post'] as $v) { $ps = new am4_Settings_Post_Meta(); $ps->loadFromArray(array())->setPostId($v)->save(); } } }
function doSave() { $options = get_magic_quotes_gpc() ? stripslashes_deep(am4Request::get('options')) : am4Request::get('options'); if (($errors = $this->validate($options)) !== true) { $this->doIndex($options, $errors); } else { $this->saveForm($options); $this->doIndex(); } }
function doAjaxDelete() { $id = am4Request::getInt('id'); $errors = $this->getOptions(); $errors->delete($id)->save(); }
static function init() { foreach ($_GET as $k => $v) { self::$vars[$k] = $v; self::$get[$k] = $v; } foreach ($_POST as $k => $v) { self::$vars[$k] = $v; self::$post[$k] = $v; } self::$method = $_SERVER['REQUEST_METHOD']; }
function doAjaxRemove() { $data = am4Request::get("data"); parse_str($data, $vars); if ($vars['post'] && is_array($vars['post'])) { foreach ($vars['post'] as $v) { update_post_meta($v, AM4_POST_META, array()); } } }
function doAjaxDelete() { $id = am4Request::getInt('id'); $options = $this->getOptions(); unset($options[$id]); update_option(AM4_ERROR_OPTION, $options); }