page_title = __( 'AdSense Options', 'adsense'); // title for options page $adsns_plugin->menu_title = __( 'AdSense', '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 } if( ! function_exists( 'bws_add_menu_render' ) ) { function bws_add_menu_render() { // Adding BWS plugin menu global $title; $active_plugins = get_option('active_plugins'); $all_plugins = get_plugins(); $array_activate = array(); $array_install = array(); $array_recomend = array(); $count_activate = $count_install = $count_recomend = 0; $array_plugins = array( array( 'captcha\/captcha.php', 'Captcha', 'http://wordpress.org/extend/plugins/captcha/', 'http://bestwebsoft.com/plugin/captcha-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=captcha&_wpnonce=e66502ec9a' ), array( 'contact-form-plugin\/contact_form.php', 'Contact Form', 'http://wordpress.org/extend/plugins/contact-form-plugin/', 'http://bestwebsoft.com/plugin/contact-form/', '/wp-admin/update.php?action=install-plugin&plugin=contact-form-plugin&_wpnonce=47757d936f' ), array( 'facebook-button-plugin\/facebook-button-plugin.php', 'Facebook Like Button Plugin', 'http://wordpress.org/extend/plugins/facebook-button-plugin/', 'http://bestwebsoft.com/plugin/facebook-like-button-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=facebook-button-plugin&_wpnonce=6eb654de19' ), array( 'twitter-plugin\/twitter.php', 'Twitter Plugin', 'http://wordpress.org/extend/plugins/twitter-plugin/', 'http://bestwebsoft.com/plugin/twitter-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=twitter-plugin&_wpnonce=1612c998a5' ), array( 'portfolio\/portfolio.php', 'Portfolio', 'http://wordpress.org/extend/plugins/portfolio/', 'http://bestwebsoft.com/plugin/portfolio-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=portfolio&_wpnonce=488af7391d' ), array( 'gallery-plugin\/gallery-plugin.php', 'Gallery', 'http://wordpress.org/extend/plugins/gallery-plugin/', 'http://bestwebsoft.com/plugin/gallery-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=gallery-plugin&_wpnonce=f82ce8c1ad' ), array( 'adsense-plugin\/adsense-plugin.php', 'Google AdSense Plugin', 'http://wordpress.org/extend/plugins/adsense-plugin/', 'http://bestwebsoft.com/plugin/google-adsense-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=adsense-plugin&_wpnonce=e6e85756de' ) ); foreach($array_plugins as $plugins) { if( 0 < count( preg_grep( "/".$plugins[0]."/", $active_plugins ) ) ) { $array_activate[$count_activate]['title'] = $plugins[1]; $array_activate[$count_activate]['link'] = $plugins[2]; $array_activate[$count_activate]['href'] = $plugins[3]; $count_activate++; } else if( array_key_exists(str_replace("\\", "", $plugins[0]), $all_plugins) ) { $array_install[$count_install]['title'] = $plugins[1]; $array_install[$count_install]['link'] = $plugins[2]; $array_install[$count_install]['href'] = $plugins[3]; $count_install++; } else { $array_recomend[$count_recomend]['title'] = $plugins[1]; $array_recomend[$count_recomend]['link'] = $plugins[2]; $array_recomend[$count_recomend]['href'] = $plugins[3]; $array_recomend[$count_recomend]['slug'] = $plugins[4]; $count_recomend++; } } ?>

0) { ?>

0) { ?>

0) { ?>

" title="">

http://bestwebsoft.com/contact/