getAds(); $stats = $advman_engine->getStats(); $date = date('Y-m-d'); $adCount = 0; $activeAdCount = 0; $networks = array(); if (!empty($ads)) { $adCount = sizeof($ads); foreach ($ads as $ad) { if ($ad->active) { $activeAdCount++; } $networks[strtolower(get_class($ad))] = $ad->network_name; } } $filterActive = !empty($filter['active']) ? $filter['active'] : null; $filterNetwork = !empty($filter['network']) ? $filter['network'] : null; $defaultAdName = $advman_engine->getSetting('default-ad'); ?>
get_property('adformat'); // If format is custom, format it like: Custom (468x60) if ($format == 'custom') { $format = __('Custom', 'advman') . ' (' . $ad->get_property('width') . 'x' . $ad->get('height') . ')'; } // Find a default if the format is not filled in if (empty($format)) { $format = $ad->get_network_property('adformat'); if ($format == 'custom') { $format = __('Custom', 'advman') . ' (' . $ad->get_property('width') . 'x' . $ad->get('height') . ')'; } if (!empty($format)) { $format = "" . $format . ""; } } $type = $ad->get_property('adtype'); // If there is an ad type, prefix it on to the format if (empty($type)) { $type = $ad->get_network_property('adtype'); if (!empty($type)) { $types = array( 'ad' => __('Ad Unit', 'advmgr'), 'link' => __('Link Unit', 'advmgr'), 'ref_text' => __('Text Referral', 'advmgr'), 'ref_image' => __('Image Referral', 'advmgr'), ); $type = "" . $types[$type] . ""; } } if (!empty($format) && (!empty($type))) { return $type . '