copyAd($ad->id); } } Advman_Admin::add_notice('advman-notice-once', __("Ads copied"), false); break; case 'delete' : foreach ($ads as $ad) { if ($ad) { $advman_engine->deleteAd($ad->id); } } Advman_Admin::add_notice('advman-notice-once', __("Ads deleted"), false); break; } } } else { $ad = Advman_Tools::get_current_ad(); if ($ad) { Advman_Admin::ad_action($action, $ad); } } $url = remove_query_arg(array('action', 'ad', 'network', '_wpnonce')); wp_redirect($url); } } static function ad_analytics_action($action) { global $advman_engine; // First, if there are no ads, redirect to the create screen $ads = $advman_engine->getAds(); if (!$ads) { wp_redirect(admin_url('admin.php?page=advman-ad-new')); } } static function process() { global $advman_analytics; $q = Advman_Tools::get_search_query(); echo '
' . __('This screen shows performance of ads running on your site. Select the timeframe that you want to view, and all ads that were shown during that timeframe will appear below.') . '
' ) ); get_current_screen()->add_help_tab( array( 'id' => 'screen-content', 'title' => __('Screen Content'), 'content' => '' . __('You can customize the display of this screen’s contents in a number of ways:') . '
' . '' . __('For more information:') . '
' . '' . __('Plugin Page') . '
' . '' . __('Support Forums') . '
' ); } static function add_options() { $option = 'per_page'; $args = array( 'label' => 'Ads', 'default' => 10, 'option' => 'ads_per_page' ); add_screen_option( $option, $args ); } } ?>