id) || $screen->id !== 'toplevel_page_advanced-ads') return; add_meta_box('advads_overview_news', __('News and Tutorials', ADVADS_SLUG), array($this, 'dashboard_widget_function'), $screen->id, 'normal', 'high'); add_meta_box('advads_overview_ads', __('My Ads', ADVADS_SLUG), array('AdvAds_Overview_Widgets_Callbacks', 'render_ad_widget'), $screen->id, 'normal', 'high'); add_meta_box('advads_overview_support', __('Manual and Support', ADVADS_SLUG), array('AdvAds_Overview_Widgets_Callbacks', 'render_support'), $screen->id, 'normal', 'high'); // add widgets for pro add ons add_meta_box('advads_overview_addon_tracking', __('Tracking and Stats', ADVADS_SLUG), array('AdvAds_Overview_Widgets_Callbacks', 'render_add_on_tracking'), $screen->id, 'side', 'high'); add_meta_box('advads_overview_addon_responsive', __('Responsive and Mobile ads', ADVADS_SLUG), array('AdvAds_Overview_Widgets_Callbacks', 'render_add_on_responsive'), $screen->id, 'side', 'high'); add_meta_box('advads_overview_addon_sticky', __('Sticky ads', ADVADS_SLUG), array('AdvAds_Overview_Widgets_Callbacks', 'render_add_on_sticky'), $screen->id, 'side', 'high'); add_meta_box('advads_overview_addon_layer', __('PopUps and Layers', ADVADS_SLUG), array('AdvAds_Overview_Widgets_Callbacks', 'render_add_on_layer'), $screen->id, 'side', 'high'); } /** * ads widget */ public function render_ad_widget(){ $recent_ads = Advanced_Ads::get_ads(); ?>
Manage them or create a new one', ADVADS_SLUG), 'edit.php?post_type='. Advanced_Ads::POST_TYPE_SLUG, 'post-new.php?post_type='. Advanced_Ads::POST_TYPE_SLUG); ?>
' . __('Create your first ad', ADVADS_SLUG) . ''; endif; if(count($groups) == 0) : $next_steps[] = '' . __('Ad Groups contain ads and are currently used to rotate multiple ads on a single spot.', ADVADS_SLUG) . '
' . '' . __('Create your first group', ADVADS_SLUG) . '
'; endif; if(count($placements) == 0) : $next_steps[] = '' . __('Ad Placements are the best way to manage where to display ads and groups.', ADVADS_SLUG) . '
' . '' . __('Create your first placement', ADVADS_SLUG) . '
'; endif; // display all options if(count($next_steps) > 0){ ?>