. */ /* Stop direct call */ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) die('Sorry, you don't have direct access to this page.'); // get the tinymce plugin define( 'AT_PATH', plugin_dir_path(__FILE__) ); if (!class_exists('A5_AddMceButton')) require_once AT_PATH.'tinymce/A5_MCEButtonClass.php'; // AdSenseTargeting begin of class class AdSenseTargeting { static $language_file = 'adsense-targeting'; function AdSenseTargeting() { // import laguage files load_plugin_textdomain(self::$language_file, false , basename(dirname(__FILE__)).'/languages'); add_filter('plugin_row_meta', array($this, 'at_register_links'),10,2); add_shortcode( 'at_ignore_tag', array($this, 'at_wrap_ignore')); add_filter('loop_start', array($this, 'google_start')); add_filter('loop_end', array($this, 'google_end')); add_action('wp_head', array($this, 'at_header'), 1000); $tinymce_button = new A5_AddMceButton ('adsense-targeting', 'GoogleIgnoreTags', 'mce_buttons_2'); } // Selbstbeweihräucherung function at_header() { echo "\r\n"; } //Additional links on the plugin page function at_register_links($links, $file) { $base = plugin_basename(__FILE__); if ($file == $base) : $links[] = ''.__('FAQ', self::$language_file).''; $links[] = ''.__('Donate', self::$language_file).''; endif; return $links; } // adding short code function at_wrap_ignore($atts, $content = null){ $eol = "\r\n"; return $eol.''.$eol.''.$eol.do_shortcode($content).$eol.''.$eol.''.$eol; } // wrapping the loop into adsense tags function google_start() { echo "\r\n"; } function google_end() { echo "\r\n"; } } // end of class $adsensetargeting = new AdSenseTargeting; ?>