protected function doAction($strActionName, $vArgs) { if (!isset($this->arrActionHooks[$strActionName])) { return; } $arrSubjectPageInfo = array('post_id' => $this->intPostID, 'post_type' => $this->strPostType, 'term_ids' => $this->arrTermIDs) + $this->arrDisplayedPageTypes; foreach ($this->arrActionHooks[$strActionName] as $intAutoInsertID) { if (!$this->isAutoInsertEnabledPage($intAutoInsertID, $arrSubjectPageInfo)) { continue; } $arrAutoInsertOptions = $this->arrAutoInsertOptions[$intAutoInsertID]; $oUnits = new AmazonAutoLinks_Units(array('id' => $arrAutoInsertOptions['unit_ids'])); $oUnits->render(); } }