adsns_get_options(); } function adsns_get_options() { } // Number of views ads on a home page function adsns_home_postviews() { $options = get_option( 'adsns_sets' ); // Get an array of ad settings if( is_home() ) { $options['num_show'] += $options['max_homepostads']; // Counting views update_option( 'adsns_sets', $options ); } } // Number of views ads on a single page function adsns_single_postviews() { $options = get_option( 'adsns_sets' ); if( is_single() ) { $options['num_show']++; update_option( 'adsns_sets', $options ); } } // Number of views footer ads function adsns_footer_postviews() { $options = get_option( 'adsns_sets' ); if( !is_feed() ) { $options['num_show']++; update_option( 'adsns_sets', $options ); } } // Number of posts on home page function adsns_post_count( $content ) { global $adsns_count; $adsns_count++; return $content; } // Show ads after post on a single page function adsns_end_post_ad( $content ) { $codd = get_option( 'adsns_sets' ); // Get an array of ad settings $codd['code'] = stripslashes( $codd['code'] ); $this->adsns_donate(); // Calling a donate function if ( ! is_feed() && is_single() ) { // Checking if we are on a single page $content.= '
".__("Options saved.", 'adsense')."
".__("Please enter your Publisher ID.", 'adsense')."