Adsense WoW Instruction Page .A simple Wordpress plugin to insert Google Adsense into posts, pages, sidebars. */ /* This program is free software; you can redistribute it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ $wp_simple_ad_insert_version = 1.1; function show_ad_camp_1() { $ad_camp_encoded_value_1 = get_option('wp_ad_camp_1_code'); $ad_camp_decoded_value_1 = html_entity_decode($ad_camp_encoded_value_1, ENT_COMPAT); if(!empty($ad_camp_decoded_value_1)) { $output .= " $ad_camp_decoded_value_1"; } return $output; } function show_ad_camp_2() { $ad_camp_encoded_value_2 = get_option('wp_ad_camp_2_code'); $ad_camp_decoded_value_2 = html_entity_decode($ad_camp_encoded_value_2, ENT_COMPAT); if(!empty($ad_camp_decoded_value_2)) { $output .= " $ad_camp_decoded_value_2"; } return $output; } function show_ad_camp_3() { $ad_camp_encoded_value_3 = get_option('wp_ad_camp_3_code'); $ad_camp_decoded_value_3 = html_entity_decode($ad_camp_encoded_value_3, ENT_COMPAT); if(!empty($ad_camp_decoded_value_3)) { $output .= " $ad_camp_decoded_value_3"; } return $output; } function wp_ad_camp_process($content) { if (strpos($content, "") !== FALSE) { $content = preg_replace('/
\s*\s*<\/p>/i', "", $content); $content = str_replace('', show_ad_camp_1(), $content); } if (strpos($content, "") !== FALSE) { $content = preg_replace('/
\s*\s*<\/p>/i', "", $content); $content = str_replace('', show_ad_camp_2(), $content); } if (strpos($content, "") !== FALSE) { $content = preg_replace('/
\s*\s*<\/p>/i', "", $content); $content = str_replace('', show_ad_camp_3(), $content); } return $content; } // Displays Simple Ad Campaign Options menu function ad_camp_add_option_page() { if (function_exists('add_options_page')) { add_options_page('Adsense WoW', 'Adsense WoW', 8, __FILE__, 'ad_insertion_options_page'); } } function ad_insertion_options_page() { global $wp_simple_ad_insert_version; if (isset($_POST['info_update'])) { echo '
'; $tmpCode1 = htmlentities(stripslashes($_POST['wp_ad_camp_1_code']) , ENT_COMPAT); update_option('wp_ad_camp_1_code', $tmpCode1); $tmpCode2 = htmlentities(stripslashes($_POST['wp_ad_camp_2_code']) , ENT_COMPAT); update_option('wp_ad_camp_2_code', $tmpCode2); $tmpCode3 = htmlentities(stripslashes($_POST['wp_ad_camp_3_code']) , ENT_COMPAT); update_option('wp_ad_camp_3_code', $tmpCode3); echo 'Options Updated!'; echo '
For information and updates, please visit:
http://111waystomakemoney.com/adsense-wow/