/** * * @access protected as the ..._New class extends this class and acess this method. * @return array */ protected function getSanitizedAutoInsertMeta($aMeta) { $_oUtil = new AmazonAutoLinks_WPUtility(); $_aDefinedKeys = array_keys(AmazonAutoLinks_AutoInsertAdminPage::$aStructure_AutoInsertDefaultOptions); // Drop keys not defined in the default structure. foreach ($aMeta as $_sKey => $_mValue) { if (in_array($_sKey, $_aDefinedKeys)) { continue; } unset($aMeta[$_sKey]); } $aMeta['filter_hooks'] = $_oUtil->trimDelimitedElements($aMeta['filter_hooks'], ','); $aMeta['action_hooks'] = $_oUtil->trimDelimitedElements($aMeta['action_hooks'], ','); $aMeta['enable_post_ids'] = $_oUtil->trimDelimitedElements($aMeta['enable_post_ids'], ','); $aMeta['diable_post_ids'] = $_oUtil->trimDelimitedElements($aMeta['diable_post_ids'], ','); return $aMeta; }