get_row($wpdb->prepare("SELECT `id`, `title`, `bannercode`, `tracker`, `image` FROM `{$wpdb->prefix}adrotate` WHERE `id` = %d AND (`type` = 'active' OR `type` = '2days' OR `type` = '7days');", $banner_id)); if($banner) { if($adrotate_debug['general'] == true) { echo "

[DEBUG][adrotate_ad()] Selected Ad ID

";
				print_r($banner->id); 
				echo "

"; } $selected = array($banner->id => 0); $selected = adrotate_filter_schedule($selected, $banner); } else { $selected = false; } if($selected) { $image = str_replace('%folder%', $adrotate_config['banner_folder'], $banner->image); if($individual == true) $output .= '
'; $output .= adrotate_ad_output($banner->id, 0, $banner->title, $banner->bannercode, $banner->tracker, $image); if($individual == true) $output .= '
'; if($adrotate_config['stats'] == 1) { adrotate_count_impression($banner->id, 0, 0); } } else { $output .= adrotate_error('ad_expired', array($banner_id)); } unset($banner); } else { $output .= adrotate_error('ad_no_id'); } return $output; } /*------------------------------------------------------------- Name: adrotate_group Purpose: Fetch ads in specified group(s) and show a random ad Since: 3.0 -------------------------------------------------------------*/ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) { global $wpdb, $adrotate_config, $adrotate_debug; $output = $group_select = ''; if($group_ids) { $now = adrotate_now(); $group_array = (preg_match('/,/is', $group_ids)) ? explode(",", $group_ids) : array($group_ids); $group_array = array_filter($group_array); foreach($group_array as $key => $value) { $group_select .= " `{$wpdb->prefix}adrotate_linkmeta`.`group` = {$value} OR"; } $group_select = rtrim($group_select, " OR"); $group = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' AND `id` = %d;", $group_array[0])); if($adrotate_debug['general'] == true) { echo "

[DEBUG][adrotate_group] Selected group

"; 
			print_r($group);
			echo "

"; } if($group) { // Get all ads in all selected groups $ads = $wpdb->get_results( "SELECT `{$wpdb->prefix}adrotate`.`id`, `{$wpdb->prefix}adrotate`.`title`, `{$wpdb->prefix}adrotate`.`bannercode`, `{$wpdb->prefix}adrotate`.`image`, `{$wpdb->prefix}adrotate`.`tracker`, `{$wpdb->prefix}adrotate_linkmeta`.`group` FROM `{$wpdb->prefix}adrotate`, `{$wpdb->prefix}adrotate_linkmeta` WHERE ({$group_select}) AND `{$wpdb->prefix}adrotate_linkmeta`.`user` = 0 AND `{$wpdb->prefix}adrotate`.`id` = `{$wpdb->prefix}adrotate_linkmeta`.`ad` AND (`{$wpdb->prefix}adrotate`.`type` = 'active' OR `{$wpdb->prefix}adrotate`.`type` = '2days' OR `{$wpdb->prefix}adrotate`.`type` = '7days') GROUP BY `{$wpdb->prefix}adrotate`.`id` ORDER BY `{$wpdb->prefix}adrotate`.`id`;"); if($ads) { if($adrotate_debug['general'] == true) { echo "

[DEBUG][adrotate_group()] All ads in group

"; 
					print_r($ads); 
					echo "

"; } foreach($ads as $ad) { $selected[$ad->id] = $ad; $selected = adrotate_filter_schedule($selected, $ad); } unset($ads); if($adrotate_debug['general'] == true) { echo "

[DEBUG][adrotate_group] Reduced array based on schedule restrictions

"; 
					print_r($selected); 
					echo "

"; } $array_count = count($selected); if($array_count > 0) { $before = $after = ''; $before = str_replace('%id%', $group_array[0], stripslashes(html_entity_decode($group->wrapper_before, ENT_QUOTES))); $after = str_replace('%id%', $group_array[0], stripslashes(html_entity_decode($group->wrapper_after, ENT_QUOTES))); $output .= '
'; // Kill dynamic mode for mobile users if($adrotate_config['mobile_dynamic_mode'] == 'Y' AND $group->modus == 1 AND (adrotate_is_mobile() OR adrotate_is_tablet())) { $group->modus = 0; } if($group->modus == 1) { // Dynamic ads $i = 1; // Limit group to save resources $amount = ($group->adspeed >= 10000) ? 10 : 20; // Randomize and trim output $selected = adrotate_shuffle($selected); foreach($selected as $key => $banner) { if($i <= $amount) { $image = str_replace('%folder%', $adrotate_config['banner_folder'], $banner->image); $output .= '
'; $output .= $before.adrotate_ad_output($banner->id, $group->id, $banner->title, $banner->bannercode, $banner->tracker, $image).$after; $output .= '
'; $i++; } } } else if($group->modus == 2) { // Block of ads $block_count = $group->gridcolumns * $group->gridrows; if($array_count < $block_count) $block_count = $array_count; $columns = 1; for($i=1;$i<=$block_count;$i++) { $banner_id = array_rand($selected, 1); $image = str_replace('%folder%', $adrotate_config['banner_folder'], $selected[$banner_id]->image); $output .= '
'; $output .= $before.adrotate_ad_output($selected[$banner_id]->id, $group->id, $selected[$banner_id]->title, $selected[$banner_id]->bannercode, $selected[$banner_id]->tracker, $image).$after; $output .= '
'; if($columns == $group->gridcolumns AND $i != $block_count) { $output .= '
'; $columns = 1; } else { $columns++; } if($adrotate_config['stats'] == 1){ adrotate_count_impression($selected[$banner_id]->id, $group->id, 0); } unset($selected[$banner_id]); } } else { // Default (single ad) $banner_id = array_rand($selected, 1); $image = str_replace('%folder%', $adrotate_config['banner_folder'], $selected[$banner_id]->image); $output .= '
'; $output .= $before.adrotate_ad_output($selected[$banner_id]->id, $group->id, $selected[$banner_id]->title, $selected[$banner_id]->bannercode, $selected[$banner_id]->tracker, $image).$after; $output .= '
'; if($adrotate_config['stats'] == 1){ adrotate_count_impression($selected[$banner_id]->id, $group->id, 0); } } $output .= '
'; unset($selected); } else { $output .= adrotate_error('ad_expired'); } } else { $output .= adrotate_error('ad_unqualified'); } } else { $output .= adrotate_error('group_not_found', array($group_array[0])); } } else { $output .= adrotate_error('group_no_id'); } return $output; } /*------------------------------------------------------------- Name: adrotate_shortcode Purpose: Prepare function requests for calls on shortcodes Since: 0.7 -------------------------------------------------------------*/ function adrotate_shortcode($atts, $content = null) { global $adrotate_config; $banner_id = $group_ids = 0; if(!empty($atts['banner'])) $banner_id = trim($atts['banner'], "\r\t "); if(!empty($atts['group'])) $group_ids = trim($atts['group'], "\r\t "); if(!empty($atts['fallback'])) $fallback = 0; // Not supported in free version if(!empty($atts['weight'])) $weight = 0; // Not supported in free version if(!empty($atts['site'])) $site = 0; // Not supported in free version $output = ''; if($adrotate_config['w3caching'] == "Y") { $output .= ''; if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad $output .= 'echo adrotate_ad('.$banner_id.', true);'; } if($banner_id == 0 AND $group_ids > 0) { // Show group $output .= 'echo adrotate_group('.$group_ids.');'; } $output .= ''; } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) { $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase(); $output .= ' '; if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad $output .= 'echo adrotate_ad('.$banner_id.', true);'; } if($banner_id == 0 AND $group_ids > 0) { // Show group $output .= 'echo adrotate_group('.$group_ids.');'; } $output .= ' '; unset($borlabsphrase); } else { if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad $output .= adrotate_ad($banner_id, true); } if($banner_id == 0 AND $group_ids > 0) { // Show group $output .= adrotate_group($group_ids); } } return $output; } /*------------------------------------------------------------- Name: adrotate_inject_posts Purpose: Add an advert to a single post Added: 3.7 -------------------------------------------------------------*/ function adrotate_inject_posts($post_content) { global $wpdb, $post, $adrotate_config, $adrotate_debug; $group_array = array(); if(is_page()) { // Inject ads into page $ids = $wpdb->get_results("SELECT `id`, `page`, `page_loc`, `page_par` FROM `{$wpdb->prefix}adrotate_groups` WHERE `page_loc` > 0 AND `page_loc` < 5;"); foreach($ids as $id) { $pages = explode(",", $id->page); if(!is_array($pages)) $pages = array(); if(in_array($post->ID, $pages)) { $group_array[$id->id] = array('location' => $id->page_loc, 'paragraph' => $id->page_par, 'ids' => $pages); } } unset($ids, $pages); } if(is_single()) { // Inject ads into posts in specified category $ids = $wpdb->get_results("SELECT `id`, `cat`, `cat_loc`, `cat_par` FROM `{$wpdb->prefix}adrotate_groups` WHERE `cat_loc` > 0 AND `cat_loc` < 5;"); $wp_categories = get_terms('category', array('fields' => 'ids')); foreach($ids as $id) { $categories = explode(",", $id->cat); if(!is_array($categories)) $categories = array(); foreach($wp_categories as &$value) { if(in_array($value, $categories)) { $group_array[$id->id] = array('location' => $id->cat_loc, 'paragraph' => $id->cat_par, 'ids' => $categories); } } } unset($ids, $wp_categories, $categories); } $group_array = adrotate_shuffle($group_array); $group_count = count($group_array); if($adrotate_debug['general'] == true) { echo "

[DEBUG][adrotate_inject_posts()] group_array

"; 
		echo "Group count: ".$group_count."
"; print_r($group_array); echo "

"; } if($group_count > 0) { $before = $after = $inside = 0; $advert_output = ''; foreach($group_array as $group_id => $group) { if(is_page($group['ids']) OR has_category($group['ids'])) { // Caching or not? if($adrotate_config['w3caching'] == 'Y') { $advert_output = ''; $advert_output .= 'echo adrotate_group('.$group_id.');'; $advert_output .= ''; } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) { $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase(); $advert_output = ''; $advert_output .= 'echo adrotate_group('.$group_id.');'; $advert_output .= ''; unset($borlabsphrase); } else { $advert_output = adrotate_group($group_id); } // Advert in front of content if(($group['location'] == 1 OR $group['location'] == 3) AND $before == 0) { $post_content = $advert_output.$post_content; unset($group_array[$group_id]); $before = 1; } // Advert behind the content if(($group['location'] == 2 OR $group['location'] == 3) AND $after == 0) { $post_content = $post_content.$advert_output; unset($group_array[$group_id]); $after = 1; } // Adverts inside the content if($group['location'] == 4) { $paragraphs = explode('

', $post_content); $paragraph_count = count($paragraphs); $count_p = ($group['paragraph'] == 99) ? ceil($paragraph_count / 2) : $group['paragraph']; foreach($paragraphs as $index => $paragraph) { if(trim($paragraph)) { $paragraphs[$index] .= '

'; } if($count_p == $index + 1 AND $inside == 0) { $paragraphs[$index] .= $advert_output; unset($group_array[$group_id]); $inside = 1; } } $inside = 0; // Reset for the next paragraph $post_content = implode('', $paragraphs); unset($paragraphs, $paragraph_count); } } } unset($group_array, $before, $after, $inside, $advert_output); } return $post_content; } /*------------------------------------------------------------- Name: adrotate_preview Purpose: Show preview of selected ad (Dashboard) Since: 3.0 -------------------------------------------------------------*/ function adrotate_preview($banner_id) { global $wpdb, $adrotate_debug; if($banner_id) { $now = adrotate_now(); $banner = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$wpdb->prefix}adrotate` WHERE `id` = %d;", $banner_id)); if($adrotate_debug['general'] == true) { echo "

[DEBUG][adrotate_preview()] Ad information

"; 
			print_r($banner); 
			echo "

"; } if($banner) { $image = str_replace('%folder%', '/banners/', $banner->image); $output = adrotate_ad_output($banner->id, 0, $banner->title, $banner->bannercode, $banner->tracker, $image); } else { $output = adrotate_error('ad_expired'); } } else { $output = adrotate_error('ad_no_id'); } return $output; } /*------------------------------------------------------------- Name: adrotate_ad_output Purpose: Prepare the output for viewing Since: 3.0 -------------------------------------------------------------*/ function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $image) { global $blog_id, $adrotate_debug, $adrotate_config; $banner_output = $bannercode; $banner_output = stripslashes(htmlspecialchars_decode($banner_output, ENT_QUOTES)); if($adrotate_config['stats'] > 0 AND $tracker == "Y") { if(empty($blog_id) or $blog_id == '') { $blog_id = 0; } if($adrotate_config['stats'] == 1) { // Internal tracker preg_match_all('/](?:.*?)>/i', $banner_output, $matches, PREG_SET_ORDER); if(isset($matches[0])) { $banner_output = str_ireplace(']+class=\"(.+?)\"[^>]*>/i', $value, $regs)) { $result = $regs[1]." gofollow"; $banner_output = str_ireplace('class="'.$regs[1].'"', 'class="'.$result.'"', $banner_output); } else { $banner_output = str_ireplace(' 0) wp_enqueue_script('jshowoff-adrotate', plugins_url('/library/jquery.adrotate.dyngroup.js', __FILE__), false, null, $in_footer); // Make clicktracking and impression tracking a possibility if($adrotate_config['stats'] == 1) { wp_enqueue_script('clicktrack-adrotate', plugins_url('/library/jquery.adrotate.clicktracker.js', __FILE__), false, null, $in_footer); wp_localize_script('jshowoff-adrotate', 'impression_object', array('ajax_url' => admin_url( 'admin-ajax.php'))); wp_localize_script('clicktrack-adrotate', 'click_object', array('ajax_url' => admin_url('admin-ajax.php'))); } if(!$in_footer) { add_action('wp_head', 'adrotate_custom_javascript'); } else { add_action('wp_footer', 'adrotate_custom_javascript', 100); } } /*------------------------------------------------------------- Name: adrotate_custom_javascript Purpose: Add required JavaScript to site Since: 3.10.5 -------------------------------------------------------------*/ function adrotate_custom_javascript() { global $wpdb, $adrotate_config; $groups = $wpdb->get_results("SELECT `id`, `adspeed` FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' AND `modus` = 1 ORDER BY `id` ASC;"); if($groups) { $output = "\n"; $output .= "\n"; $output .= "\n\n"; unset($groups); echo $output; } } /*------------------------------------------------------------- Name: adrotate_header Purpose: Add required CSS to site head Since: 3.8 -------------------------------------------------------------*/ function adrotate_header() { global $wpdb, $adrotate_config; $generated_css = get_option( 'adrotate_group_css', array() ); $output = "\n\n"; $output .= "\n"; $output .= "\n"; $output .= "\n\n"; echo $output; } /*------------------------------------------------------------- Name: adrotate_nonce_error Purpose: Display a formatted error if Nonce fails Since: 3.7.4.2 -------------------------------------------------------------*/ function adrotate_nonce_error() { echo '

'.__('Oh no! Something went wrong!', 'adrotate').'

'; echo '

'.__('WordPress was unable to verify the authenticity of the url you have clicked. Verify if the url used is valid or log in via your browser.', 'adrotate').'

'; echo '

'.__('If you have received the url you want to visit via email, you are being tricked!', 'adrotate').'

'; echo '

'.__('Contact support if the issue persists:', 'adrotate').' AJdG Solutions Support.

'; } /*------------------------------------------------------------- Name: adrotate_error Purpose: Show errors for problems in using AdRotate, should they occur Since: 3.0 -------------------------------------------------------------*/ function adrotate_error($action, $arg = null) { global $adrotate_debug; switch($action) { // Ads case "ad_expired" : if($adrotate_debug['general'] == true) { $result = ''.__('Error, Ad is not available at this time due to schedule/geolocation restrictions or does not exist!', 'adrotate').''; } else { $result = ''; } return $result; break; case "ad_unqualified" : if($adrotate_debug['general'] == true) { $result = ''.__('Either there are no banners, they are disabled or none qualified for this location!', 'adrotate').''; } else { $result = ''; } return $result; break; case "ad_no_id" : $result = ''.__('Error, no Ad ID set! Check your syntax!', 'adrotate').''; return $result; break; // Groups case "group_no_id" : $result = ''.__('Error, no group ID set! Check your syntax!', 'adrotate').''; return $result; break; case "group_not_found" : $result = ''.__('Error, group does not exist! Check your syntax!', 'adrotate').' (ID: '.$arg[0].')'; return $result; break; // Database case "db_error" : $result = ''.__('There was an error locating the database tables for AdRotate. Please deactivate and re-activate AdRotate from the plugin page!!', 'adrotate').'
'.__('If this does not solve the issue please seek support at', 'adrotate').' ajdg.solutions/forums/forum/adrotate-for-wordpress/
'; return $result; break; // Misc default: $result = ''.__('An unknown error occured.', 'adrotate').' (ID: '.$arg[0].')'; return $result; break; } } /*------------------------------------------------------------- Name: adrotate_dashboard_error Purpose: Show errors for problems in using AdRotate Since: 3.19.1 -------------------------------------------------------------*/ function adrotate_dashboard_error() { global $adrotate_config; // Adverts $status = get_option('adrotate_advert_status'); $adrotate_notifications = get_option("adrotate_notifications"); if($adrotate_notifications['notification_dash'] == "Y") { if($status['expired'] > 0 AND $adrotate_notifications['notification_dash_expired'] == "Y") { $error['advert_expired'] = sprintf(_n('One advert is expired.', '%1$s adverts expired!', $status['expired'], 'adrotate'), $status['expired']).' '.__('Check adverts', 'adrotate').'!'; } if($status['expiressoon'] > 0 AND $adrotate_notifications['notification_dash_soon'] == "Y") { $error['advert_soon'] = sprintf(_n('One advert expires soon.', '%1$s adverts are almost expiring!', $status['expiressoon'], 'adrotate'), $status['expiressoon']).' '.__('Check adverts', 'adrotate').'!'; } } if($status['error'] > 0) { $error['advert_config'] = sprintf(_n('One advert with configuration errors.', '%1$s adverts have configuration errors!', $status['error'], 'adrotate'), $status['error']).' '.__('Check adverts', 'adrotate').'!'; } // Caching if($adrotate_config['w3caching'] == "Y" AND !is_plugin_active('w3-total-cache/w3-total-cache.php')) { $error['w3tc_not_active'] = __('You have enabled caching support but W3 Total Cache is not active on your site!', 'adrotate').' '.__('Disable W3 Total Cache Support', 'adrotate').'.'; } if($adrotate_config['w3caching'] == "Y" AND !defined('W3TC_DYNAMIC_SECURITY')) { $error['w3tc_no_hash'] = __('You have enable caching support but the W3TC_DYNAMIC_SECURITY definition is not set.', 'adrotate').' '.__('How to configure W3 Total Cache', 'adrotate').'.'; } if($adrotate_config['borlabscache'] == "Y" AND !class_exists('\Borlabs\Factory') AND \Borlabs\Factory::get('Cache\Config')->get('cacheActivated') != 'yes') { $error['borlabs_not_active'] = __('You have enable caching support but Borlabs Cache is not active on your site!', 'adrotate-pro').' '.__('Disable Borlabs Cache Support', 'adrotate-pro').'.'; } if(class_exists('\Borlabs\Factory') AND \Borlabs\Factory::get('Cache\Config')->get('cacheActivated') == 'yes') { $borlabscache = ''; if(class_exists('\Borlabs\Factory')) { $borlabscache = \Borlabs\Factory::get('Cache\Config')->get('fragmentCaching'); } if($adrotate_config['borlabscache'] == "Y" AND $borlabscache == '') { $error['borlabs_fragment_error'] = __('You have enabled Borlabs Cache support but Fragment caching is not enabled!', 'adrotate-pro').' '.__('Enable Fragment Caching', 'adrotate-pro').'.'; } } // Misc if(!is_writable(WP_CONTENT_DIR."/".$adrotate_config['banner_folder'])) { $error['banners_folder'] = __('Your AdRotate Banner folder is not writable or does not exist.', 'adrotate').' '.__('Set up your banner folder', 'adrotate').'.'; } $error = (isset($error) AND is_array($error)) ? $error : false; return $error; } /*------------------------------------------------------------- Name: adrotate_notifications_dashboard Purpose: Notify user of expired banners in the dashboard Since: 3.0 -------------------------------------------------------------*/ function adrotate_notifications_dashboard() { if(current_user_can('adrotate_ad_manage')) { // Advert notifications, errors, important stuff $adrotate_has_error = adrotate_dashboard_error(); if($adrotate_has_error) { echo '
'; echo '
'; echo '
AdRotate has detected '._n('one issue that requires', 'several issues that require', count($adrotate_has_error), 'adrotate').' '.__('your attention:', 'adrotate').'
'; foreach($adrotate_has_error as $error => $message) { echo '» '.$message.'
'; } echo '
'; echo '
'; echo '
'; echo '
'; } if(isset($_GET['page'])) { $page = $_GET['page']; } else { $page = ''; } if(strpos($page, 'adrotate') !== false) { if(isset($_GET['hide']) AND $_GET['hide'] == 1) update_option('adrotate_hide_review', 1); if(isset($_GET['hide']) AND $_GET['hide'] == 2) update_option('adrotate_hide_competition', 1); if(isset($_GET['hide']) AND $_GET['hide'] == 3) update_option('adrotate_hide_premium', 1); if(isset($_GET['hide']) AND $_GET['hide'] == 4) update_option('adrotate_hide_premium_2', 1); if(isset($_GET['hide']) AND $_GET['hide'] == 5) update_option('adrotate_hide_premium_3', 1); // Get AdRotate Pro echo '
'; echo '
'; echo ' '; echo '
'.__("Upgrade to AdRotate Professional and get Geo Targeting, Schedules and more...", 'adrotate').'
'.__('Use discount code getadrotatepro for 10% off on any AdRotate license!', 'adrotate' ).' '.__('Thank you for your support!', 'adrotate' ).'
'; echo '
'; echo '
'; echo '
'; // Please write a review $review_banner = get_option('adrotate_hide_review'); if($review_banner != 1 AND $review_banner < (adrotate_now() - (8 * DAY_IN_SECONDS))) { echo '
'; echo '
'; echo ' '; echo '
You have been using AdRotate for a few days. Write a encouraging review!
If you have questions, complaints or something else that doesn\'t belong in a review, please reach out!
'; echo ' '; echo '
'; echo '
'; echo '
'; } // AdRotate Switch $competition_banner = get_option('adrotate_hide_competition'); if($competition_banner != 1) { $adrotate_has_competition = adrotate_check_competition(); if($adrotate_has_competition) { echo '
'; echo '
'; echo ' '; echo '
AdRotate found '._n('one plugin', 'several plugins', count($adrotate_has_competition), 'adrotate').' that can be imported:
'; foreach($adrotate_has_competition as $plugin) { echo '» '.$plugin.'
'; } echo '
Configured plugins can be imported into AdRotate! What is AdRotate Switch?
'; echo ' '; echo '
'; echo '
'; echo '
'; } } } } if(isset($_GET['upgrade']) AND $_GET['upgrade'] == 1) adrotate_check_upgrade(); $adrotate_db_version = get_option("adrotate_db_version"); $adrotate_version = get_option("adrotate_version"); if($adrotate_db_version['current'] < ADROTATE_DB_VERSION OR $adrotate_version['current'] < ADROTATE_VERSION) { echo '
'; echo '
'; echo ' '; echo '
You have almost completed updating AdRotate to version '.ADROTATE_DISPLAY.'!
To complete the update click the button on the left. This may take a few seconds to complete!
'; echo '
'; echo '
'; echo '
'; } if(isset($_GET['tasks']) AND $_GET['tasks'] == 1) adrotate_check_schedules(); } /*------------------------------------------------------------- Name: adrotate_welcome_pointer Purpose: Show dashboard pointers Since: 3.9.14 -------------------------------------------------------------*/ function adrotate_welcome_pointer() { $pointer_content = '

AdRotate '.ADROTATE_DISPLAY.'

'; $pointer_content .= '

'.__('Thank you for choosing AdRotate. Everything related to AdRotate is in this menu. If you need help getting started take a look at the', 'adrotate').' '.__('manuals', 'adrotate').' '.__('and', 'adrotate').' '.__('forums', 'adrotate').'. These links are also available in the help tab in the top right.

'; $pointer_content .= '

AdRotate Professional - Learn more »
If you like AdRotate, consider upgrading to AdRotate Pro and benefit from many extra features to make your campaigns more profitable!

'; $pointer_content .= '

Ad blockers
Disable your ad blocker in your browser so your adverts and dashboard show up correctly. AdRotate Pro has a disguise feature for adverts to help you avoid ad blockers.

'; ?> add_help_tab(array( 'id' => 'adrotate_thanks', 'title' => 'Thanks to you', 'content' => '

Thank you for using AdRotate

'. '

AdRotate is growing to be one of the most popular WordPress plugins for Advertising and is a household name for many companies around the world. AdRotate wouldn\'t be possible without your support and my life wouldn\'t be what it is today without your help.

- Arnan

'. '

Social: Facebook & LinkedIn. Business: ajdg.solutions. Personal: arnan.me.

' ) ); $screen->add_help_tab(array( 'id' => 'adrotate_partners', 'title' => 'Advertising Partners', 'content' => '

Our partners

'. '

Try these great advertising partners for getting relevant adverts to your site. Increase revenue with their contextual adverts and earn more money with AdRotate!

'. '

Blind Ferret: Sign up with the Blind Ferret Publisher Network
Industry leader in Header Bidding adverts!'. '

Media.net: Sign up for Media.net Contextual Adverts
Get 10% extra earnings commission for the first 3 months!

'. '

Social: Facebook & LinkedIn. Business: ajdg.solutions. Personal: arnan.me.

'. '

These are affiliate links, using them supports the future of AdRotate!

' ) ); $screen->add_help_tab(array( 'id' => 'adrotate_support', 'title' => 'Getting Support', 'content' => '

Get help using AdRotate

'. '

Everyone needs a little help sometimes. AdRotate has many guides and manuals as well as a Support Forum on the AdRotate website to get you going.

'. '

Take a look at the AdRotate Manuals and the Support Forum.

'. '

Social: Facebook & LinkedIn. Business: ajdg.solutions. Personal: arnan.me.

' ) ); } /*------------------------------------------------------------- Name: adrotate_action_links Purpose: Plugin page link Since: 4.11 -------------------------------------------------------------*/ function adrotate_action_links($links) { $custom_actions = array(); $custom_actions['adrotate-pro'] = sprintf('%s', 'https://ajdg.solutions/cart/?add-to-cart=1124', 'Get Pro'); $custom_actions['adrotate-help'] = sprintf('%s', 'https://ajdg.solutions/support/', 'Support'); $custom_actions['adrotate-arnan'] = sprintf('%s', 'https://www.arnan.me/', 'arnan.me'); return array_merge($custom_actions, $links); } /*------------------------------------------------------------- Name: adrotate_credits Purpose: Promotional stuff shown throughout the plugin Since: 3.7 -------------------------------------------------------------*/ function adrotate_credits() { echo ''; echo ''; echo ''; echo ' '; echo ' '; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'.__('Help AdRotate Grow', 'adrotate').''.__('AdRotate Professional', 'adrotate').'
AdRotate Logo
'.__("Many users only think to review AdRotate when something goes wrong while thousands of people happily use AdRotate.", 'adrotate').' '. __("If you find AdRotate useful please leave your", 'adrotate').' '.__('rating','adrotate').' '.__('and','adrotate').' '.__('review','adrotate').' '.__('on WordPress.org to help AdRotate grow in a positive way', 'adrotate').'!AdRotate Pro for WordPress'.__('Get more advanced features like Geo Targeting, scheduling and much more with AdRotate Pro.', 'adrotate').'
'.__('Includes premium support and free updates!', 'adrotate').'
So why wait? '.__('Get started today', 'adrotate').' »
'; echo adrotate_trademark(); } /*------------------------------------------------------------- Name: adrotate_trademark Purpose: Trademark notice Since: 3.9.14 -------------------------------------------------------------*/ function adrotate_trademark() { return '
AdRotate® is a registered trademark.
'; } ?>