function init_operations() { if (isset($_GET["proupgrade"]) && $_GET["proupgrade"] == "hide") { $this->o["upgrade_to_pro"] = 0; update_option("gd-taxonomy-tools", $this->o); wp_redirect(remove_query_arg("proupgrade")); exit; } if (isset($_GET["action"])) { $action = $_GET["action"]; $url = remove_query_arg("action"); switch ($action) { case "delcpt": $id = $this->find_custompost_pos($_GET["pid"]); if ($id > -1) { unset($this->p[$id]); $this->p = array_values($this->p); update_option('gd-taxonomy-tools-cpt', $this->p); } $url = remove_query_arg("pid", $url); wp_redirect($url); exit; break; case "deltax": $id = $this->find_taxonomy_pos($_GET["tid"]); if ($id > -1) { $tax_name = $this->t[$id]["name"]; unset($this->t[$id]); $this->t = array_values($this->t); update_option('gd-taxonomy-tools-tax', $this->t); gdttDB::delete_taxonomy_terms($tax_name); } $url = remove_query_arg("tid", $url); wp_redirect($url); exit; break; } } }
function init_operations() { global $gdtt; if (isset($_GET['proupgradett']) && $_GET['proupgradett'] == 'hide') { $gdtt->o['upgrade_to_pro_16'] = 0; update_option('gd-taxonomy-tools', $gdtt->o); wp_redirect(remove_query_arg('proupgradett')); exit; } if (isset($_GET['notice132gdtt']) && $_GET['notice132gdtt'] == 'hide') { $gdtt->o['upgrade_notice_132'] = 0; update_option('gd-taxonomy-tools', $gdtt->o); wp_redirect(remove_query_arg('notice132gdtt')); exit; } if (isset($_GET['action'])) { $action = $_GET['action']; $url = remove_query_arg('action'); switch ($action) { case 'delcpt': $id = $gdtt->find_custompost_pos($_GET['pid']); if ($id > -1) { unset($gdtt->p[$id]); $gdtt->p = array_values($gdtt->p); update_option('gd-taxonomy-tools-cpt', $gdtt->p); } $url = remove_query_arg('pid', $url); wp_redirect($url); exit; break; case 'deltax': $id = $gdtt->find_taxonomy_pos($_GET['tid']); if ($id > -1) { $tax_name = $gdtt->t[$id]['name']; unset($gdtt->t[$id]); $gdtt->t = array_values($gdtt->t); update_option('gd-taxonomy-tools-tax', $gdtt->t); gdttDB::delete_taxonomy_terms($tax_name); } $url = remove_query_arg('tid', $url); wp_redirect($url); exit; break; } } }