public function import_data() { $data = get_transient('import_data'); $new_positions = DFP_Ads_Globals::filter_post_var('code', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY); foreach ($data as $position) { if (array_key_exists($position['#Code'], $new_positions)) { echo 'Added Position <kbd>' . $position['#Code'] . '</kbd>.<br />'; $this->add_position($position); } } }
/** * Verifies the nonce is correct. * * @since 0.3.1 * @access private * * @return bool */ private function verify_nonce() { if (DFP_Ads_Globals::post_var_exists($this->nonce) && wp_verify_nonce(DFP_Ads_Globals::get_post_var($this->nonce), basename(__FILE__))) { return true; } else { return false; } }