/** * User constructor. */ public function start() { parent::start(); if (!$this->oProp->bIsAdmin) { return; } // For the create new unit page. Disable the default one. if ($this->isUserClickedAddNewLink(AmazonAutoLinks_Registry::$aPostTypes['unit'])) { exit(wp_safe_redirect(add_query_arg(array('post_type' => AmazonAutoLinks_Registry::$aPostTypes['unit'], 'page' => AmazonAutoLinks_Registry::$aAdminPages['category_select']), admin_url('edit.php')))); } }
/** * User constructor. */ public function start() { if (!$this->oProp->bIsAdmin) { return; } // $this->oEncode = new AmazonAutoLinks_Encrypt; // For the create new unit page. Disable the default one. if ($this->isUserClickedAddNewLink(AmazonAutoLinks_Registry::$aPostTypes['auto_insert'])) { // Go to the Auto-insert creation page. exit(wp_safe_redirect(add_query_arg(array('post_type' => AmazonAutoLinks_Registry::$aPostTypes['unit'], 'page' => AmazonAutoLinks_Registry::$aAdminPages['auto_insert'], 'tab' => 'new'), admin_url('edit.php')))); } parent::start(); }