page_title = 'AdSense Options'; // title for options page $adsns_plugin->menu_title = 'AdSense'; // name in menu $count = 0; //current number of showed ads $current_count = 0; // tmp var for storing a number of already showed ads $adsns_count = 0; // number of posts on home page $options = get_option( 'adsns_sets' ); // array of options $max_ads = $options['max_ads']; // max number of ads // This function showing ads at the choosen position function adsns_show_ads() { global $options; global $max_ads; global $count; global $current_count; global $adsns_count; global $adsns_plugin; // checking in what position we should show an ads if ( $options['position'] == 'postend' ) { // if we choose ad position after post(single page) add_filter( 'the_content', array( $adsns_plugin, 'adsns_end_post_ad' ) ); // adding ad after post add_action('wp_head', array( $adsns_plugin, 'adsns_single_postviews' ) ); // count a number of ad views } else if ( $options['position'] == 'homepostend' ) { // if we choose ad position after post(home page) add_action( 'the_content', array( $adsns_plugin, 'adsns_post_count' ) ); // get a number of posts on home page add_filter ( 'the_content', array( $adsns_plugin, 'adsns_end_home_post_ad' ) ); // adding ad after post add_action('wp_head', array( $adsns_plugin, 'adsns_home_postviews' ) ); // count a number of ad views } else if ( $options['position'] == 'commentform' ) { // if we choose ad position after comment form add_filter( 'comment_id_fields', array( $adsns_plugin, 'adsns_end_comment_ad' ) ); // adding ad after comment form add_action('wp_head', array( $adsns_plugin, 'adsns_single_postviews' ) ); // count a number of ad views } else if ( $options['position'] == 'footer' ) { // if we choose ad position in a footer add_filter( 'get_footer', array( $adsns_plugin, 'adsns_end_footer_ad' ) ); // adding footer ad add_action('wp_head', array( $adsns_plugin, 'adsns_footer_postviews' ) ); // count a number of ad views } // end checking } // Action for adsns_show_ads add_action( 'after_setup_theme', 'adsns_show_ads' ); if( ! function_exists( 'bws_plugin_header' ) ) { function bws_plugin_header() { // adding stylesheets for BWS icon global $post_type; ?>
Read more Download " title="">
If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site http://bestwebsoft.com/contact/